@dxos/plugin-automation 0.8.2-main.f11618f → 0.8.2-main.fbd8ed0

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 (144) hide show
  1. package/dist/lib/browser/{AutomationContainer-KEQ5RNIW.mjs → AutomationContainer-DA6IW7O2.mjs} +3 -3
  2. package/dist/lib/browser/{AutomationPanel-G3OB6ELR.mjs → AutomationPanel-R42D3LDD.mjs} +3 -3
  3. package/dist/lib/browser/{FunctionsContainer-STXBW4CX.mjs → FunctionsContainer-MPBMMOMS.mjs} +2 -2
  4. package/dist/lib/browser/{FunctionsPanel-JJPLIAJW.mjs → FunctionsPanel-NSI3P53X.mjs} +2 -2
  5. package/dist/lib/browser/{app-graph-builder-ND64CHOM.mjs → app-graph-builder-2OGPEVBA.mjs} +13 -15
  6. package/dist/lib/browser/app-graph-builder-2OGPEVBA.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-NGG4ICAQ.mjs → chunk-2QF27UJ2.mjs} +12 -12
  8. package/dist/lib/browser/chunk-2QF27UJ2.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-ADYCSC6Y.mjs +39 -0
  10. package/dist/lib/browser/chunk-ADYCSC6Y.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-BNQNURZN.mjs +211 -0
  12. package/dist/lib/browser/chunk-BNQNURZN.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-QJPKWYTL.mjs → chunk-SGT76SL2.mjs} +5 -5
  14. package/dist/lib/browser/{chunk-65VL4EYS.mjs → chunk-TRC3J2I6.mjs} +6 -6
  15. package/dist/lib/browser/chunk-TRC3J2I6.mjs.map +7 -0
  16. package/dist/lib/browser/index.mjs +6 -6
  17. package/dist/lib/browser/index.mjs.map +1 -1
  18. package/dist/lib/browser/{intent-resolver-SNIAQ7V5.mjs → intent-resolver-X3H6ZSP4.mjs} +12 -13
  19. package/dist/lib/browser/intent-resolver-X3H6ZSP4.mjs.map +7 -0
  20. package/dist/lib/browser/meta.json +1 -1
  21. package/dist/lib/browser/{react-surface-L22QIANU.mjs → react-surface-MOXIHBMS.mjs} +4 -4
  22. package/dist/lib/browser/{react-surface-L22QIANU.mjs.map → react-surface-MOXIHBMS.mjs.map} +1 -1
  23. package/dist/lib/browser/types.mjs +1 -1
  24. package/dist/lib/node/{AutomationContainer-E5I76FPP.cjs → AutomationContainer-FIFH4P5T.cjs} +7 -7
  25. package/dist/lib/node/{AutomationPanel-YLXAFJDP.cjs → AutomationPanel-HTNEWBGB.cjs} +8 -8
  26. package/dist/lib/node/{AutomationPanel-YLXAFJDP.cjs.map → AutomationPanel-HTNEWBGB.cjs.map} +2 -2
  27. package/dist/lib/node/{FunctionsContainer-3HCURMEB.cjs → FunctionsContainer-LF2F6CPE.cjs} +6 -6
  28. package/dist/lib/node/{FunctionsPanel-SYIZHPGU.cjs → FunctionsPanel-6HOAIMQ3.cjs} +7 -7
  29. package/dist/lib/node/{FunctionsPanel-SYIZHPGU.cjs.map → FunctionsPanel-6HOAIMQ3.cjs.map} +2 -2
  30. package/dist/lib/node/{app-graph-builder-TVFR6RXO.cjs → app-graph-builder-3XGDVWHR.cjs} +16 -18
  31. package/dist/lib/node/app-graph-builder-3XGDVWHR.cjs.map +7 -0
  32. package/dist/lib/node/{chunk-BSK5SHTR.cjs → chunk-CBHWMYKF.cjs} +9 -9
  33. package/dist/lib/node/chunk-CBHWMYKF.cjs.map +7 -0
  34. package/dist/lib/node/{chunk-PSIJDHAX.cjs → chunk-GDCG2BML.cjs} +19 -19
  35. package/dist/lib/node/chunk-GDCG2BML.cjs.map +7 -0
  36. package/dist/lib/node/chunk-S3Z4AP77.cjs +234 -0
  37. package/dist/lib/node/chunk-S3Z4AP77.cjs.map +7 -0
  38. package/dist/lib/node/{chunk-L5TWLPGA.cjs → chunk-SV2CB3FT.cjs} +8 -8
  39. package/dist/lib/node/{chunk-SRXHHBDE.cjs → chunk-TI3WBQIB.cjs} +18 -18
  40. package/dist/lib/node/chunk-TI3WBQIB.cjs.map +7 -0
  41. package/dist/lib/node/index.cjs +13 -13
  42. package/dist/lib/node/index.cjs.map +2 -2
  43. package/dist/lib/node/{intent-resolver-A44BNFEG.cjs → intent-resolver-Q7WJ4PZZ.cjs} +17 -18
  44. package/dist/lib/node/intent-resolver-Q7WJ4PZZ.cjs.map +7 -0
  45. package/dist/lib/node/meta.json +1 -1
  46. package/dist/lib/node/{react-surface-PCZCHIET.cjs → react-surface-43VHU36V.cjs} +11 -11
  47. package/dist/lib/node/react-surface-43VHU36V.cjs.map +7 -0
  48. package/dist/lib/node/types.cjs +2 -2
  49. package/dist/lib/node/types.cjs.map +1 -1
  50. package/dist/lib/node-esm/{AutomationContainer-22PUFPSE.mjs → AutomationContainer-OP43F4PD.mjs} +3 -3
  51. package/dist/lib/node-esm/{AutomationPanel-6UXIAJVS.mjs → AutomationPanel-ZQKRBWP2.mjs} +3 -3
  52. package/dist/lib/node-esm/{FunctionsContainer-XG5WVAN3.mjs → FunctionsContainer-5TVRDIX5.mjs} +2 -2
  53. package/dist/lib/node-esm/{FunctionsPanel-J3QGUESH.mjs → FunctionsPanel-NMEW26KL.mjs} +2 -2
  54. package/dist/lib/node-esm/{app-graph-builder-NYLOXWVV.mjs → app-graph-builder-UR2E5CQY.mjs} +13 -15
  55. package/dist/lib/node-esm/app-graph-builder-UR2E5CQY.mjs.map +7 -0
  56. package/dist/lib/node-esm/{chunk-4UPGANGV.mjs → chunk-AD4C4IK2.mjs} +6 -6
  57. package/dist/lib/node-esm/chunk-AD4C4IK2.mjs.map +7 -0
  58. package/dist/lib/node-esm/{chunk-TMMB5ETD.mjs → chunk-CUPEMOYK.mjs} +5 -5
  59. package/dist/lib/node-esm/{chunk-HMYAQLGF.mjs → chunk-DIUPZXCQ.mjs} +12 -12
  60. package/dist/lib/node-esm/chunk-DIUPZXCQ.mjs.map +7 -0
  61. package/dist/lib/node-esm/chunk-DZ7RKC52.mjs +212 -0
  62. package/dist/lib/node-esm/chunk-DZ7RKC52.mjs.map +7 -0
  63. package/dist/lib/node-esm/{chunk-YYBCQXB2.mjs → chunk-EEA6CZ6B.mjs} +16 -16
  64. package/dist/lib/node-esm/chunk-EEA6CZ6B.mjs.map +7 -0
  65. package/dist/lib/node-esm/index.mjs +6 -6
  66. package/dist/lib/node-esm/index.mjs.map +1 -1
  67. package/dist/lib/node-esm/{intent-resolver-JFLTVJ7D.mjs → intent-resolver-HEUGQ6SL.mjs} +12 -13
  68. package/dist/lib/node-esm/intent-resolver-HEUGQ6SL.mjs.map +7 -0
  69. package/dist/lib/node-esm/meta.json +1 -1
  70. package/dist/lib/node-esm/{react-surface-VSO4NWC6.mjs → react-surface-TER7JEF6.mjs} +4 -4
  71. package/dist/lib/node-esm/{react-surface-VSO4NWC6.mjs.map → react-surface-TER7JEF6.mjs.map} +1 -1
  72. package/dist/lib/node-esm/types.mjs +1 -1
  73. package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
  74. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/index.d.ts +2 -178
  76. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  77. package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
  78. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  79. package/dist/types/src/components/AutomationContainer.d.ts.map +1 -1
  80. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -1
  81. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  82. package/dist/types/src/components/FunctionsContainer.d.ts.map +1 -1
  83. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
  84. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +12 -0
  85. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -0
  86. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +5 -0
  87. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -0
  88. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -1
  89. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  90. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  91. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  92. package/dist/types/src/types.d.ts +15 -15
  93. package/dist/types/src/types.d.ts.map +1 -1
  94. package/dist/types/tsconfig.tsbuildinfo +1 -1
  95. package/package.json +31 -24
  96. package/src/AutomationPlugin.tsx +1 -1
  97. package/src/capabilities/app-graph-builder.ts +64 -41
  98. package/src/capabilities/intent-resolver.ts +10 -13
  99. package/src/capabilities/react-surface.tsx +1 -1
  100. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +2 -2
  101. package/src/components/AutomationPanel/AutomationPanel.tsx +11 -10
  102. package/src/components/FunctionsPanel/FunctionsPanel.tsx +5 -5
  103. package/src/components/TriggerEditor/FunctionInputEditor.tsx +77 -0
  104. package/src/components/TriggerEditor/SpecSelector.tsx +59 -0
  105. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +17 -8
  106. package/src/components/TriggerEditor/TriggerEditor.tsx +53 -93
  107. package/src/testing/test-functions.ts +23 -9
  108. package/src/types.ts +11 -10
  109. package/dist/lib/browser/app-graph-builder-ND64CHOM.mjs.map +0 -7
  110. package/dist/lib/browser/chunk-65VL4EYS.mjs.map +0 -7
  111. package/dist/lib/browser/chunk-FALBBJNO.mjs +0 -138
  112. package/dist/lib/browser/chunk-FALBBJNO.mjs.map +0 -7
  113. package/dist/lib/browser/chunk-FCLWFVFX.mjs +0 -39
  114. package/dist/lib/browser/chunk-FCLWFVFX.mjs.map +0 -7
  115. package/dist/lib/browser/chunk-NGG4ICAQ.mjs.map +0 -7
  116. package/dist/lib/browser/intent-resolver-SNIAQ7V5.mjs.map +0 -7
  117. package/dist/lib/node/app-graph-builder-TVFR6RXO.cjs.map +0 -7
  118. package/dist/lib/node/chunk-BSK5SHTR.cjs.map +0 -7
  119. package/dist/lib/node/chunk-FTEDH5Q6.cjs +0 -167
  120. package/dist/lib/node/chunk-FTEDH5Q6.cjs.map +0 -7
  121. package/dist/lib/node/chunk-PSIJDHAX.cjs.map +0 -7
  122. package/dist/lib/node/chunk-SRXHHBDE.cjs.map +0 -7
  123. package/dist/lib/node/intent-resolver-A44BNFEG.cjs.map +0 -7
  124. package/dist/lib/node/react-surface-PCZCHIET.cjs.map +0 -7
  125. package/dist/lib/node-esm/app-graph-builder-NYLOXWVV.mjs.map +0 -7
  126. package/dist/lib/node-esm/chunk-4UPGANGV.mjs.map +0 -7
  127. package/dist/lib/node-esm/chunk-HMYAQLGF.mjs.map +0 -7
  128. package/dist/lib/node-esm/chunk-M4QXMIIB.mjs +0 -139
  129. package/dist/lib/node-esm/chunk-M4QXMIIB.mjs.map +0 -7
  130. package/dist/lib/node-esm/chunk-YYBCQXB2.mjs.map +0 -7
  131. package/dist/lib/node-esm/intent-resolver-JFLTVJ7D.mjs.map +0 -7
  132. /package/dist/lib/browser/{AutomationContainer-KEQ5RNIW.mjs.map → AutomationContainer-DA6IW7O2.mjs.map} +0 -0
  133. /package/dist/lib/browser/{AutomationPanel-G3OB6ELR.mjs.map → AutomationPanel-R42D3LDD.mjs.map} +0 -0
  134. /package/dist/lib/browser/{FunctionsContainer-STXBW4CX.mjs.map → FunctionsContainer-MPBMMOMS.mjs.map} +0 -0
  135. /package/dist/lib/browser/{FunctionsPanel-JJPLIAJW.mjs.map → FunctionsPanel-NSI3P53X.mjs.map} +0 -0
  136. /package/dist/lib/browser/{chunk-QJPKWYTL.mjs.map → chunk-SGT76SL2.mjs.map} +0 -0
  137. /package/dist/lib/node/{AutomationContainer-E5I76FPP.cjs.map → AutomationContainer-FIFH4P5T.cjs.map} +0 -0
  138. /package/dist/lib/node/{FunctionsContainer-3HCURMEB.cjs.map → FunctionsContainer-LF2F6CPE.cjs.map} +0 -0
  139. /package/dist/lib/node/{chunk-L5TWLPGA.cjs.map → chunk-SV2CB3FT.cjs.map} +0 -0
  140. /package/dist/lib/node-esm/{AutomationContainer-22PUFPSE.mjs.map → AutomationContainer-OP43F4PD.mjs.map} +0 -0
  141. /package/dist/lib/node-esm/{AutomationPanel-6UXIAJVS.mjs.map → AutomationPanel-ZQKRBWP2.mjs.map} +0 -0
  142. /package/dist/lib/node-esm/{FunctionsContainer-XG5WVAN3.mjs.map → FunctionsContainer-5TVRDIX5.mjs.map} +0 -0
  143. /package/dist/lib/node-esm/{FunctionsPanel-J3QGUESH.mjs.map → FunctionsPanel-NMEW26KL.mjs.map} +0 -0
  144. /package/dist/lib/node-esm/{chunk-TMMB5ETD.mjs.map → chunk-CUPEMOYK.mjs.map} +0 -0
@@ -16,26 +16,26 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var app_graph_builder_TVFR6RXO_exports = {};
20
- __export(app_graph_builder_TVFR6RXO_exports, {
19
+ var app_graph_builder_3XGDVWHR_exports = {};
20
+ __export(app_graph_builder_3XGDVWHR_exports, {
21
21
  default: () => app_graph_builder_default
22
22
  });
23
- module.exports = __toCommonJS(app_graph_builder_TVFR6RXO_exports);
23
+ module.exports = __toCommonJS(app_graph_builder_3XGDVWHR_exports);
24
24
  var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
25
+ var import_rx_react = require("@effect-rx/rx-react");
26
+ var import_effect = require("effect");
25
27
  var import_app_framework = require("@dxos/app-framework");
26
28
  var import_echo_schema = require("@dxos/echo-schema");
27
29
  var import_functions = require("@dxos/functions");
28
30
  var import_types = require("@dxos/plugin-deck/types");
29
31
  var import_plugin_graph = require("@dxos/plugin-graph");
30
- var import_types2 = require("@dxos/plugin-script/types");
31
32
  var import_plugin_space = require("@dxos/plugin-space");
32
33
  var app_graph_builder_default = (context) => (0, import_app_framework.contributes)(import_app_framework.Capabilities.AppGraphBuilder, [
33
34
  (0, import_plugin_graph.createExtension)({
34
35
  id: `${import_chunk_7GXNXMSM.meta.id}/space-settings-automation`,
35
- filter: (node) => node.type === `${import_plugin_space.SPACE_PLUGIN}/settings`,
36
- connector: ({ node }) => [
36
+ connector: (node) => import_rx_react.Rx.make((get) => (0, import_effect.pipe)(get(node), import_effect.Option.flatMap((node2) => node2.type === `${import_plugin_space.SPACE_PLUGIN}/settings` ? import_effect.Option.some(node2) : import_effect.Option.none()), import_effect.Option.map((node2) => [
37
37
  {
38
- id: `automation-${node.id}`,
38
+ id: `automation-${node2.id}`,
39
39
  type: `${import_chunk_7GXNXMSM.meta.id}/space-settings-automation`,
40
40
  data: `${import_chunk_7GXNXMSM.meta.id}/space-settings-automation`,
41
41
  properties: {
@@ -48,14 +48,13 @@ var app_graph_builder_default = (context) => (0, import_app_framework.contribute
48
48
  icon: "ph--lightning--regular"
49
49
  }
50
50
  }
51
- ]
51
+ ]), import_effect.Option.getOrElse(() => [])))
52
52
  }),
53
53
  (0, import_plugin_graph.createExtension)({
54
54
  id: `${import_chunk_7GXNXMSM.meta.id}/space-settings-functions`,
55
- filter: (node) => node.type === `${import_plugin_space.SPACE_PLUGIN}/settings`,
56
- connector: ({ node }) => [
55
+ connector: (node) => import_rx_react.Rx.make((get) => (0, import_effect.pipe)(get(node), import_effect.Option.flatMap((node2) => node2.type === `${import_plugin_space.SPACE_PLUGIN}/settings` ? import_effect.Option.some(node2) : import_effect.Option.none()), import_effect.Option.map((node2) => [
57
56
  {
58
- id: `functions-${node.id}`,
57
+ id: `functions-${node2.id}`,
59
58
  type: `${import_chunk_7GXNXMSM.meta.id}/space-settings-functions`,
60
59
  data: `${import_chunk_7GXNXMSM.meta.id}/space-settings-functions`,
61
60
  properties: {
@@ -68,15 +67,14 @@ var app_graph_builder_default = (context) => (0, import_app_framework.contribute
68
67
  icon: "ph--function--regular"
69
68
  }
70
69
  }
71
- ]
70
+ ]), import_effect.Option.getOrElse(() => [])))
72
71
  }),
73
72
  (0, import_plugin_graph.createExtension)({
74
- id: `${import_types2.SCRIPT_PLUGIN}/script-companion`,
75
- filter: (node) => (0, import_echo_schema.isInstanceOf)(import_functions.ScriptType, node.data),
76
- connector: ({ node }) => [
73
+ id: `${import_chunk_7GXNXMSM.meta.id}/script-companion`,
74
+ connector: (node) => import_rx_react.Rx.make((get) => (0, import_effect.pipe)(get(node), import_effect.Option.flatMap((node2) => (0, import_echo_schema.isInstanceOf)(import_functions.ScriptType, node2.data) ? import_effect.Option.some(node2) : import_effect.Option.none()), import_effect.Option.map((node2) => [
77
75
  {
78
76
  id: [
79
- node.id,
77
+ node2.id,
80
78
  "automation"
81
79
  ].join(import_types.ATTENDABLE_PATH_SEPARATOR),
82
80
  type: import_types.PLANK_COMPANION_TYPE,
@@ -91,7 +89,7 @@ var app_graph_builder_default = (context) => (0, import_app_framework.contribute
91
89
  icon: "ph--lightning--regular"
92
90
  }
93
91
  }
94
- ]
92
+ ]), import_effect.Option.getOrElse(() => [])))
95
93
  })
96
94
  ]);
97
- //# sourceMappingURL=app-graph-builder-TVFR6RXO.cjs.map
95
+ //# sourceMappingURL=app-graph-builder-3XGDVWHR.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { ScriptType } from '@dxos/functions';\nimport { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';\nimport { createExtension } from '@dxos/plugin-graph';\nimport { SPACE_PLUGIN } from '@dxos/plugin-space';\n\nimport { meta } from '../meta';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.AppGraphBuilder, [\n createExtension({\n id: `${meta.id}/space-settings-automation`,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.type === `${SPACE_PLUGIN}/settings` ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: `automation-${node.id}`,\n type: `${meta.id}/space-settings-automation`,\n data: `${meta.id}/space-settings-automation`,\n properties: {\n label: ['automation panel label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${meta.id}/space-settings-functions`,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.type === `${SPACE_PLUGIN}/settings` ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: `functions-${node.id}`,\n type: `${meta.id}/space-settings-functions`,\n data: `${meta.id}/space-settings-functions`,\n properties: {\n label: ['functions panel label', { ns: meta.id }],\n icon: 'ph--function--regular',\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${meta.id}/script-companion`,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (isInstanceOf(ScriptType, node.data) ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: [node.id, 'automation'].join(ATTENDABLE_PATH_SEPARATOR),\n type: PLANK_COMPANION_TYPE,\n data: 'automation',\n properties: {\n label: ['script automation label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,sBAAmB;AACnB,oBAA6B;AAE7B,2BAA8D;AAC9D,yBAA6B;AAC7B,uBAA2B;AAC3B,mBAAgE;AAChE,0BAAgC;AAChC,0BAA6B;AAI7B,IAAA,4BAAe,CAACA,gBACdC,kCAAYC,kCAAaC,iBAAiB;MACxCC,qCAAgB;IACdC,IAAI,GAAGC,2BAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,mBAAGC,KAAK,CAACC,YACPC,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AI,CAAA,GAC/FL,qBAAOM,IAAI,CAACX,UAAS;MACnB;QACEH,IAAI;UAACG,MAAKH;UAAI;UAAcuB,KAAKC,sCAAAA;QACjCd,MAAMe;QACNV,MAAM;QACNC,YAAY;UACVC,OAAO;YAAC;YAA2B;cAAEC,IAAIjB,2BAAKD;YAAG;;UACjDmB,MAAM;QACR;MACF;KACD,GACDX,qBAAOY,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;CACD;",
6
+ "names": ["context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "meta", "connector", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "type", "SPACE_PLUGIN", "some", "none", "map", "data", "properties", "label", "ns", "icon", "getOrElse", "isInstanceOf", "ScriptType", "join", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE"]
7
+ }
@@ -26,17 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_BSK5SHTR_exports = {};
30
- __export(chunk_BSK5SHTR_exports, {
29
+ var chunk_CBHWMYKF_exports = {};
30
+ __export(chunk_CBHWMYKF_exports, {
31
31
  FunctionsPanel: () => FunctionsPanel,
32
32
  FunctionsPanel_default: () => FunctionsPanel_default
33
33
  });
34
- module.exports = __toCommonJS(chunk_BSK5SHTR_exports);
34
+ module.exports = __toCommonJS(chunk_CBHWMYKF_exports);
35
35
  var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
36
+ var import_effect = require("effect");
36
37
  var import_react = __toESM(require("react"));
37
38
  var import_app_framework = require("@dxos/app-framework");
38
- var import_echo_schema = require("@dxos/echo-schema");
39
- var import_types = require("@dxos/functions/types");
39
+ var import_functions = require("@dxos/functions");
40
40
  var import_echo = require("@dxos/react-client/echo");
41
41
  var import_react_ui = require("@dxos/react-ui");
42
42
  var import_react_ui_form = require("@dxos/react-ui-form");
@@ -45,8 +45,8 @@ var import_react_ui_theme = require("@dxos/react-ui-theme");
45
45
  var grid = "grid grid-cols-[1fr_auto] min-bs-[2.5rem]";
46
46
  var FunctionsPanel = ({ space }) => {
47
47
  const { t } = (0, import_react_ui.useTranslation)(import_chunk_7GXNXMSM.AUTOMATION_PLUGIN);
48
- const functions = (0, import_echo.useQuery)(space, import_echo.Filter.schema(import_types.FunctionType));
49
- const scripts = (0, import_echo.useQuery)(space, import_echo.Filter.schema(import_types.ScriptType));
48
+ const functions = (0, import_echo.useQuery)(space, import_echo.Filter.type(import_functions.FunctionType));
49
+ const scripts = (0, import_echo.useQuery)(space, import_echo.Filter.type(import_functions.ScriptType));
50
50
  const { dispatchPromise: dispatch } = (0, import_app_framework.useIntentDispatcher)();
51
51
  const functionToScriptMap = (0, import_react.useMemo)(() => functions.reduce((map, func) => {
52
52
  const scriptId = func.source?.target?.id;
@@ -86,7 +86,7 @@ var FunctionsPanel = ({ space }) => {
86
86
  className: (0, import_react_ui_theme.mx)(import_react_ui_form.controlItemClasses)
87
87
  }, /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.Root, {
88
88
  items: functions,
89
- isItem: import_echo_schema.S.is(import_types.FunctionType),
89
+ isItem: import_effect.Schema.is(import_functions.FunctionType),
90
90
  getId: (func) => func.id
91
91
  }, ({ items }) => /* @__PURE__ */ import_react.default.createElement("div", {
92
92
  role: "list",
@@ -113,4 +113,4 @@ var FunctionsPanel_default = FunctionsPanel;
113
113
  FunctionsPanel,
114
114
  FunctionsPanel_default
115
115
  });
116
- //# sourceMappingURL=chunk-BSK5SHTR.cjs.map
116
+ //# sourceMappingURL=chunk-CBHWMYKF.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/FunctionsPanel/FunctionsPanel.tsx", "../../../src/components/FunctionsPanel/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { FunctionType, ScriptType } from '@dxos/functions';\nimport { Filter, fullyQualifiedId, useQuery, type Space } from '@dxos/react-client/echo';\nimport { Button, useTranslation } from '@dxos/react-ui';\nimport { controlItemClasses } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/react-ui-theme';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nconst grid = 'grid grid-cols-[1fr_auto] min-bs-[2.5rem]';\n\nexport type FunctionsPanelProps = {\n space: Space;\n};\n\nexport const FunctionsPanel = ({ space }: FunctionsPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const functions = useQuery(space, Filter.type(FunctionType));\n const scripts = useQuery(space, Filter.type(ScriptType));\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n const functionToScriptMap = useMemo(\n () =>\n functions.reduce(\n (map, func) => {\n const scriptId = func.source?.target?.id;\n if (scriptId) {\n const script = scripts.find((s) => s.id === scriptId);\n if (script) {\n map[func.id] = script;\n }\n }\n return map;\n },\n {} as Record<string, ScriptType>,\n ),\n [functions, scripts],\n );\n\n const getScriptName = useCallback(\n (func: FunctionType) => {\n const script = functionToScriptMap[func.id];\n return script?.name;\n },\n [functionToScriptMap],\n );\n\n const handleGoToScript = useCallback(\n (func: FunctionType) => {\n const script = functionToScriptMap[func.id];\n if (script) {\n void dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [fullyQualifiedId(script)] }));\n }\n },\n [functionToScriptMap, dispatch],\n );\n\n return (\n <div role='none' className={mx(controlItemClasses)}>\n <List.Root<FunctionType> items={functions} isItem={Schema.is(FunctionType)} getId={(func) => func.id}>\n {({ items }) => (\n <div role='list' className='flex flex-col w-full'>\n {items?.map((func) => (\n <List.Item<FunctionType>\n key={func.id}\n item={func}\n classNames={mx(grid, ghostHover, 'items-center', 'pli-2', 'min-bs-[3rem]')}\n >\n <div className='flex flex-col truncate'>\n <List.ItemTitle classNames='truncate'>{func.name}</List.ItemTitle>\n {getScriptName(func) && (\n <div className='text-xs text-description truncate'>{getScriptName(func)}</div>\n )}\n </div>\n {functionToScriptMap[func.id] && (\n <Button onClick={() => handleGoToScript(func)}>{t('go to function source button label')}</Button>\n )}\n </List.Item>\n ))}\n </div>\n )}\n </List.Root>\n\n {functions.length === 0 && <div className='text-center plb-4 text-gray-500'>{t('no functions found')}</div>}\n </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FunctionsPanel } from './FunctionsPanel';\n\nexport * from './FunctionsPanel';\nexport default FunctionsPanel;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,oBAAuB;AACvB,mBAA4C;AAE5C,2BAAgE;AAChE,uBAAyC;AACzC,kBAA+D;AAC/D,sBAAuC;AACvC,2BAAmC;AACnC,2BAAqB;AACrB,4BAA+B;AAI/B,IAAMA,OAAO;AAMN,IAAMC,iBAAiB,CAAC,EAAEC,MAAK,MAAuB;AAC3D,QAAM,EAAEC,EAAC,QAAKC,gCAAeC,uCAAAA;AAC7B,QAAMC,gBAAYC,sBAASL,OAAOM,mBAAOC,KAAKC,6BAAAA,CAAAA;AAC9C,QAAMC,cAAUJ,sBAASL,OAAOM,mBAAOC,KAAKG,2BAAAA,CAAAA;AAC5C,QAAM,EAAEC,iBAAiBC,SAAQ,QAAKC,0CAAAA;AAEtC,QAAMC,0BAAsBC,sBAC1B,MACEX,UAAUY,OACR,CAACC,KAAKC,SAAAA;AACJ,UAAMC,WAAWD,KAAKE,QAAQC,QAAQC;AACtC,QAAIH,UAAU;AACZ,YAAMI,SAASd,QAAQe,KAAK,CAACC,MAAMA,EAAEH,OAAOH,QAAAA;AAC5C,UAAII,QAAQ;AACVN,YAAIC,KAAKI,EAAE,IAAIC;MACjB;IACF;AACA,WAAON;EACT,GACA,CAAC,CAAA,GAEL;IA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oCAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAQ7DG,UAAUqD,WAAW,KAAK,6BAAArB,QAAA,cAACC,OAAAA;IAAIE,WAAU;KAAmCtC,EAAE,oBAAA,CAAA,CAAA;AAGrF;ACvFA,IAAA,yBAAeF;",
6
+ "names": ["grid", "FunctionsPanel", "space", "t", "useTranslation", "AUTOMATION_PLUGIN", "functions", "useQuery", "Filter", "type", "FunctionType", "scripts", "ScriptType", "dispatchPromise", "dispatch", "useIntentDispatcher", "functionToScriptMap", "useMemo", "reduce", "map", "func", "scriptId", "source", "target", "id", "script", "find", "s", "getScriptName", "useCallback", "name", "handleGoToScript", "createIntent", "LayoutAction", "Open", "part", "subject", "fullyQualifiedId", "React", "div", "role", "className", "mx", "controlItemClasses", "List", "Root", "items", "isItem", "Schema", "is", "getId", "Item", "key", "item", "classNames", "ghostHover", "ItemTitle", "Button", "onClick", "length"]
7
+ }
@@ -16,37 +16,37 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_PSIJDHAX_exports = {};
20
- __export(chunk_PSIJDHAX_exports, {
19
+ var chunk_GDCG2BML_exports = {};
20
+ __export(chunk_GDCG2BML_exports, {
21
21
  AutomationAction: () => AutomationAction
22
22
  });
23
- module.exports = __toCommonJS(chunk_PSIJDHAX_exports);
23
+ module.exports = __toCommonJS(chunk_GDCG2BML_exports);
24
24
  var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
25
- var import_echo_schema = require("@dxos/echo-schema");
25
+ var import_effect = require("effect");
26
26
  var import_echo = require("@dxos/react-client/echo");
27
- var TriggerTemplate = import_echo_schema.S.Union(import_echo_schema.S.Struct({
28
- type: import_echo_schema.S.Literal("timer"),
29
- cron: import_echo_schema.S.String
30
- }), import_echo_schema.S.Struct({
31
- type: import_echo_schema.S.Literal("queue"),
32
- queueDXN: import_echo_schema.S.Any
27
+ var TriggerTemplate = import_effect.Schema.Union(import_effect.Schema.Struct({
28
+ type: import_effect.Schema.Literal("timer"),
29
+ cron: import_effect.Schema.String
30
+ }), import_effect.Schema.Struct({
31
+ type: import_effect.Schema.Literal("queue"),
32
+ queueDXN: import_effect.Schema.Any
33
33
  }));
34
34
  var AutomationAction;
35
35
  (function(AutomationAction2) {
36
36
  const AUTOMATION_ACTION = `${import_chunk_7GXNXMSM.AUTOMATION_PLUGIN}/action`;
37
- class CreateTriggerFromTemplate extends import_echo_schema.S.TaggedClass()(`${AUTOMATION_ACTION}/create-trigger-from-template`, {
38
- input: import_echo_schema.S.Struct({
37
+ class CreateTriggerFromTemplate extends import_effect.Schema.TaggedClass()(`${AUTOMATION_ACTION}/create-trigger-from-template`, {
38
+ input: import_effect.Schema.Struct({
39
39
  space: import_echo.SpaceSchema,
40
40
  template: TriggerTemplate,
41
- enabled: import_echo_schema.S.optional(import_echo_schema.S.Boolean),
41
+ enabled: import_effect.Schema.optional(import_effect.Schema.Boolean),
42
42
  // TODO(wittjosiah): Improve how this lookup is done.
43
- scriptName: import_echo_schema.S.optional(import_echo_schema.S.String),
44
- payload: import_echo_schema.S.optional(import_echo_schema.S.Record({
45
- key: import_echo_schema.S.String,
46
- value: import_echo_schema.S.Any
43
+ scriptName: import_effect.Schema.optional(import_effect.Schema.String),
44
+ input: import_effect.Schema.optional(import_effect.Schema.Record({
45
+ key: import_effect.Schema.String,
46
+ value: import_effect.Schema.Any
47
47
  }))
48
48
  }),
49
- output: import_echo_schema.S.Void
49
+ output: import_effect.Schema.Void
50
50
  }) {
51
51
  }
52
52
  AutomationAction2.CreateTriggerFromTemplate = CreateTriggerFromTemplate;
@@ -55,4 +55,4 @@ var AutomationAction;
55
55
  0 && (module.exports = {
56
56
  AutomationAction
57
57
  });
58
- //# sourceMappingURL=chunk-PSIJDHAX.cjs.map
58
+ //# sourceMappingURL=chunk-GDCG2BML.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { SpaceSchema } from '@dxos/react-client/echo';\n\nimport { AUTOMATION_PLUGIN } from './meta';\n\nconst TriggerTemplate = Schema.Union(\n Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),\n Schema.Struct({ type: Schema.Literal('queue'), queueDXN: Schema.Any }),\n);\n\nexport namespace AutomationAction {\n const AUTOMATION_ACTION = `${AUTOMATION_PLUGIN}/action`;\n\n export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(\n `${AUTOMATION_ACTION}/create-trigger-from-template`,\n {\n input: Schema.Struct({\n space: SpaceSchema,\n template: TriggerTemplate,\n enabled: Schema.optional(Schema.Boolean),\n // TODO(wittjosiah): Improve how this lookup is done.\n scriptName: Schema.optional(Schema.String),\n input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Void,\n },\n ) {}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,oBAAuB;AAEvB,kBAA4B;AAI5B,IAAMA,kBAAkBC,qBAAOC,MAC7BD,qBAAOE,OAAO;EAAEC,MAAMH,qBAAOI,QAAQ,OAAA;EAAUC,MAAML,qBAAOM;AAAO,CAAA,GACnEN,qBAAOE,OAAO;EAAEC,MAAMH,qBAAOI,QAAQ,OAAA;EAAUG,UAAUP,qBAAOQ;AAAI,CAAA,CAAA;;UAGrDC,mBAAAA;AACf,QAAMC,oBAAoB,GAAGC,uCAAAA;EAEtB,MAAMC,kCAAkCZ,qBAAOa,YAAW,EAC/D,GAAGH,iBAAAA,iCACH;IACEI,OAAOd,qBAAOE,OAAO;MACnBa,OAAOC;MACPC,UAAUlB;MACVmB,SAASlB,qBAAOmB,SAASnB,qBAAOoB,OAAO;;MAEvCC,YAAYrB,qBAAOmB,SAASnB,qBAAOM,MAAM;MACzCQ,OAAOd,qBAAOmB,SAASnB,qBAAOsB,OAAO;QAAEC,KAAKvB,qBAAOM;QAAQkB,OAAOxB,qBAAOQ;MAAI,CAAA,CAAA;IAC/E,CAAA;IACAiB,QAAQzB,qBAAO0B;EACjB,CAAA,EAAA;EACC;oBAbUd,4BAAAA;AAcf,GAjBiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;",
6
+ "names": ["TriggerTemplate", "Schema", "Union", "Struct", "type", "Literal", "cron", "String", "queueDXN", "Any", "AutomationAction", "AUTOMATION_ACTION", "AUTOMATION_PLUGIN", "CreateTriggerFromTemplate", "TaggedClass", "input", "space", "SpaceSchema", "template", "enabled", "optional", "Boolean", "scriptName", "Record", "key", "value", "output", "Void"]
7
+ }
@@ -0,0 +1,234 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var chunk_S3Z4AP77_exports = {};
30
+ __export(chunk_S3Z4AP77_exports, {
31
+ TriggerEditor: () => TriggerEditor
32
+ });
33
+ module.exports = __toCommonJS(chunk_S3Z4AP77_exports);
34
+ var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
35
+ var import_react = __toESM(require("react"));
36
+ var import_conductor = require("@dxos/conductor");
37
+ var import_echo = require("@dxos/echo");
38
+ var import_functions = require("@dxos/functions");
39
+ var import_echo2 = require("@dxos/react-client/echo");
40
+ var import_react_ui = require("@dxos/react-ui");
41
+ var import_react_ui_form = require("@dxos/react-ui-form");
42
+ var import_react2 = __toESM(require("react"));
43
+ var import_echo_schema = require("@dxos/echo-schema");
44
+ var import_react_ui2 = require("@dxos/react-ui");
45
+ var import_react_ui_form2 = require("@dxos/react-ui-form");
46
+ var import_react3 = __toESM(require("react"));
47
+ var import_functions2 = require("@dxos/functions");
48
+ var import_react_ui3 = require("@dxos/react-ui");
49
+ var import_react_ui_form3 = require("@dxos/react-ui-form");
50
+ var FunctionInputEditor = ({ functions, getValue, onValueChange, onQueryRefOptions }) => {
51
+ const selectedFunctionValue = (0, import_react_ui_form2.useFormValues)([
52
+ "function"
53
+ ]);
54
+ const selectedFunctionId = (0, import_react2.useMemo)(() => {
55
+ if (selectedFunctionValue instanceof import_echo_schema.RefImpl) {
56
+ return selectedFunctionValue.dxn.toString().split("dxn:echo:@:").at(1);
57
+ }
58
+ }, [
59
+ selectedFunctionValue
60
+ ]);
61
+ const selectedFunction = (0, import_react2.useMemo)(() => functions.find((f) => f.id === selectedFunctionId), [
62
+ functions,
63
+ selectedFunctionId
64
+ ]);
65
+ (0, import_react_ui2.useOnTransition)(
66
+ // Clear function parameter input when the function changes.
67
+ selectedFunctionValue,
68
+ (prevValue) => prevValue !== void 0 && prevValue !== selectedFunctionValue,
69
+ (currValue) => currValue !== void 0,
70
+ () => onValueChange("object", {})
71
+ );
72
+ const inputSchema = (0, import_react2.useMemo)(() => selectedFunction?.inputSchema, [
73
+ selectedFunction
74
+ ]);
75
+ const effectSchema = (0, import_react2.useMemo)(() => inputSchema ? (0, import_echo_schema.toEffectSchema)(inputSchema) : void 0, [
76
+ inputSchema
77
+ ]);
78
+ const propertyCount = inputSchema?.properties ? Object.keys(inputSchema.properties).length : 0;
79
+ const values = (0, import_react2.useMemo)(() => getValue() ?? {}, [
80
+ getValue
81
+ ]);
82
+ const handleValuesChanged = (0, import_react2.useCallback)((values2) => {
83
+ onValueChange("object", values2);
84
+ }, [
85
+ onValueChange
86
+ ]);
87
+ if (selectedFunction === void 0 || effectSchema === void 0 || propertyCount === 0) {
88
+ return null;
89
+ }
90
+ return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("h3", {
91
+ className: "text-md"
92
+ }, "Function parameters"), /* @__PURE__ */ import_react2.default.createElement(import_react_ui_form2.Form, {
93
+ schema: effectSchema,
94
+ values,
95
+ classNames: "p-0",
96
+ onValuesChanged: handleValuesChanged,
97
+ onQueryRefOptions
98
+ }));
99
+ };
100
+ var SpecSelector = (props) => {
101
+ const { t } = (0, import_react_ui3.useTranslation)(import_chunk_7GXNXMSM.AUTOMATION_PLUGIN);
102
+ const specProps = (0, import_react_ui_form3.useInputProps)([
103
+ "spec"
104
+ ]);
105
+ const handleTypeChange = (0, import_react3.useCallback)((_type, value) => {
106
+ const getDefaultTriggerSpec = (kind) => {
107
+ switch (kind) {
108
+ case import_functions2.TriggerKind.Timer:
109
+ return {
110
+ kind: import_functions2.TriggerKind.Timer,
111
+ cron: ""
112
+ };
113
+ case import_functions2.TriggerKind.Subscription:
114
+ return {
115
+ kind: import_functions2.TriggerKind.Subscription,
116
+ filter: {}
117
+ };
118
+ case import_functions2.TriggerKind.Queue:
119
+ return {
120
+ kind: import_functions2.TriggerKind.Queue,
121
+ queue: ""
122
+ };
123
+ case import_functions2.TriggerKind.Email:
124
+ return {
125
+ kind: import_functions2.TriggerKind.Email
126
+ };
127
+ case import_functions2.TriggerKind.Webhook:
128
+ return {
129
+ kind: import_functions2.TriggerKind.Webhook
130
+ };
131
+ default:
132
+ return void 0;
133
+ }
134
+ };
135
+ const defaultSpec = getDefaultTriggerSpec(value);
136
+ if (!defaultSpec) {
137
+ return;
138
+ }
139
+ specProps.onValueChange("object", defaultSpec);
140
+ }, [
141
+ specProps
142
+ ]);
143
+ const options = (0, import_react3.useMemo)(() => Object.values(import_functions2.TriggerKind).map((kind) => ({
144
+ value: kind,
145
+ label: t(`trigger type ${kind}`)
146
+ })), [
147
+ t
148
+ ]);
149
+ return /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form3.SelectInput, {
150
+ ...props,
151
+ options,
152
+ onValueChange: handleTypeChange
153
+ });
154
+ };
155
+ var TriggerEditor = ({ space, trigger, onSave, onCancel }) => {
156
+ const { t } = (0, import_react_ui.useTranslation)(import_chunk_7GXNXMSM.AUTOMATION_PLUGIN);
157
+ const functions = (0, import_echo2.useQuery)(space, import_echo2.Filter.type(import_functions.FunctionType));
158
+ const workflows = (0, import_echo2.useQuery)(space, import_echo2.Filter.type(import_conductor.ComputeGraph));
159
+ const scripts = (0, import_echo2.useQuery)(space, import_echo2.Filter.type(import_functions.ScriptType));
160
+ const handleSave = (values) => {
161
+ onSave?.(values);
162
+ };
163
+ const handleRefQueryLookup = (0, import_react_ui_form.useRefQueryLookupHandler)({
164
+ space
165
+ });
166
+ const Custom = (0, import_react.useMemo)(() => ({
167
+ ["function"]: (props) => {
168
+ const getValue = (0, import_react.useCallback)(() => {
169
+ const formValue = props.getValue();
170
+ if (import_echo2.Ref.isRef(formValue)) {
171
+ return formValue.dxn.toString();
172
+ }
173
+ return void 0;
174
+ }, [
175
+ props
176
+ ]);
177
+ const handleOnValueChange = (0, import_react.useCallback)((_type, dxnString) => {
178
+ const dxn = import_echo.DXN.parse(dxnString);
179
+ if (dxn) {
180
+ const ref = import_echo2.Ref.fromDXN(dxn);
181
+ props.onValueChange("object", ref);
182
+ }
183
+ }, [
184
+ props.onValueChange
185
+ ]);
186
+ return /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.SelectInput, {
187
+ ...props,
188
+ getValue,
189
+ onValueChange: handleOnValueChange,
190
+ options: getWorkflowOptions(workflows).concat(getFunctionOptions(scripts, functions))
191
+ });
192
+ },
193
+ ["spec.kind"]: SpecSelector,
194
+ ["input"]: (props) => /* @__PURE__ */ import_react.default.createElement(FunctionInputEditor, {
195
+ ...props,
196
+ functions,
197
+ onQueryRefOptions: handleRefQueryLookup
198
+ })
199
+ }), [
200
+ workflows,
201
+ scripts,
202
+ functions,
203
+ t
204
+ ]);
205
+ return /* @__PURE__ */ import_react.default.createElement("div", {
206
+ role: "none",
207
+ className: "bs-full is-full"
208
+ }, /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.Form, {
209
+ schema: import_functions.FunctionTriggerSchema,
210
+ values: trigger,
211
+ onSave: handleSave,
212
+ onCancel,
213
+ Custom,
214
+ onQueryRefOptions: handleRefQueryLookup
215
+ }));
216
+ };
217
+ var getWorkflowOptions = (graphs) => {
218
+ return graphs.map((graph) => ({
219
+ label: `compute-${graph.id}`,
220
+ value: `dxn:echo:@:${graph.id}`
221
+ }));
222
+ };
223
+ var getFunctionOptions = (scripts, functions) => {
224
+ const getLabel = (fn) => scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;
225
+ return functions.map((fn) => ({
226
+ label: getLabel(fn),
227
+ value: `dxn:echo:@:${fn.id}`
228
+ }));
229
+ };
230
+ // Annotate the CommonJS export names for ESM import in node:
231
+ 0 && (module.exports = {
232
+ TriggerEditor
233
+ });
234
+ //# sourceMappingURL=chunk-S3Z4AP77.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/TriggerEditor/TriggerEditor.tsx", "../../../src/components/TriggerEditor/FunctionInputEditor.tsx", "../../../src/components/TriggerEditor/SpecSelector.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { ComputeGraph } from '@dxos/conductor';\nimport { DXN } from '@dxos/echo';\nimport {\n FunctionType,\n FunctionTriggerSchema,\n type FunctionTriggerType,\n type FunctionTrigger,\n ScriptType,\n} from '@dxos/functions';\nimport { Filter, Ref, useQuery, type Space } from '@dxos/react-client/echo';\nimport { useTranslation } from '@dxos/react-ui';\nimport { type CustomInputMap, Form, SelectInput, useRefQueryLookupHandler } from '@dxos/react-ui-form';\n\nimport { FunctionInputEditor } from './FunctionInputEditor';\nimport { SpecSelector } from './SpecSelector';\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nexport type TriggerEditorProps = {\n space: Space;\n trigger: FunctionTriggerType;\n onSave?: (trigger: Omit<FunctionTrigger, 'id'>) => void;\n onCancel?: () => void;\n};\n\nexport const TriggerEditor = ({ space, trigger, onSave, onCancel }: TriggerEditorProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n\n const functions = useQuery(space, Filter.type(FunctionType));\n const workflows = useQuery(space, Filter.type(ComputeGraph));\n const scripts = useQuery(space, Filter.type(ScriptType));\n\n const handleSave = (values: FunctionTriggerType) => {\n onSave?.(values);\n };\n\n const handleRefQueryLookup = useRefQueryLookupHandler({ space });\n\n const Custom = useMemo(\n (): CustomInputMap => ({\n ['function' satisfies keyof FunctionTriggerType]: (props) => {\n const getValue = useCallback(() => {\n const formValue = props.getValue();\n if (Ref.isRef(formValue)) {\n return formValue.dxn.toString() as string;\n }\n return undefined;\n }, [props]);\n\n const handleOnValueChange = useCallback(\n (_type: any, dxnString: string) => {\n const dxn = DXN.parse(dxnString);\n if (dxn) {\n const ref = Ref.fromDXN(dxn);\n props.onValueChange('object', ref);\n }\n },\n [props.onValueChange],\n );\n\n return (\n <SelectInput\n {...props}\n getValue={getValue as any}\n onValueChange={handleOnValueChange}\n options={getWorkflowOptions(workflows).concat(getFunctionOptions(scripts, functions))}\n />\n );\n },\n ['spec.kind' as const]: SpecSelector,\n ['input' as const]: (props) => (\n <FunctionInputEditor {...props} functions={functions} onQueryRefOptions={handleRefQueryLookup} />\n ),\n }),\n [workflows, scripts, functions, t],\n );\n\n return (\n <div role='none' className='bs-full is-full'>\n <Form\n schema={FunctionTriggerSchema}\n values={trigger}\n onSave={handleSave}\n onCancel={onCancel}\n Custom={Custom}\n onQueryRefOptions={handleRefQueryLookup}\n />\n </div>\n );\n};\n\nconst getWorkflowOptions = (graphs: ComputeGraph[]) => {\n return graphs.map((graph) => ({ label: `compute-${graph.id}`, value: `dxn:echo:@:${graph.id}` }));\n};\n\nconst getFunctionOptions = (scripts: ScriptType[], functions: FunctionType[]) => {\n const getLabel = (fn: FunctionType) => scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;\n return functions.map((fn) => ({ label: getLabel(fn), value: `dxn:echo:@:${fn.id}` }));\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { type JsonPath, RefImpl, toEffectSchema } from '@dxos/echo-schema';\nimport { type FunctionType } from '@dxos/functions';\nimport { useOnTransition } from '@dxos/react-ui';\nimport { Form, type FormInputStateProps, type QueryRefOptions, useFormValues } from '@dxos/react-ui-form';\n\nexport type FunctionInputEditorProps = {\n functions: FunctionType[];\n onQueryRefOptions: QueryRefOptions;\n} & FormInputStateProps;\n\n/**\n * Editor component for function input parameters.\n */\nexport const FunctionInputEditor = ({\n functions,\n getValue,\n onValueChange,\n onQueryRefOptions,\n}: FunctionInputEditorProps) => {\n const selectedFunctionValue = useFormValues(['function' as JsonPath]);\n const selectedFunctionId = useMemo(() => {\n if (selectedFunctionValue instanceof RefImpl) {\n return selectedFunctionValue.dxn.toString().split('dxn:echo:@:').at(1);\n }\n }, [selectedFunctionValue]);\n\n const selectedFunction = useMemo(\n () => functions.find((f) => f.id === selectedFunctionId),\n [functions, selectedFunctionId],\n );\n\n useOnTransition(\n // Clear function parameter input when the function changes.\n selectedFunctionValue,\n (prevValue) => prevValue !== undefined && prevValue !== selectedFunctionValue,\n (currValue) => currValue !== undefined,\n () => onValueChange('object', {}),\n );\n\n const inputSchema = useMemo(() => selectedFunction?.inputSchema, [selectedFunction]);\n const effectSchema = useMemo(() => (inputSchema ? toEffectSchema(inputSchema) : undefined), [inputSchema]);\n const propertyCount = inputSchema?.properties ? Object.keys(inputSchema.properties).length : 0;\n\n const values = useMemo(() => getValue() ?? {}, [getValue]);\n\n const handleValuesChanged = useCallback(\n (values: any) => {\n onValueChange('object', values);\n },\n [onValueChange],\n );\n\n if (selectedFunction === undefined || effectSchema === undefined || propertyCount === 0) {\n return null;\n }\n\n return (\n <>\n <h3 className='text-md'>Function parameters</h3>\n {/* TODO(ZaymonFC): Try using <FormFields /> internal component for this nesting.\n This would allow errors to flow up to the root context. */}\n <Form\n schema={effectSchema}\n values={values}\n classNames='p-0'\n onValuesChanged={handleValuesChanged}\n onQueryRefOptions={onQueryRefOptions}\n />\n </>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { type FunctionTriggerType, TriggerKind, type TriggerType } from '@dxos/functions';\nimport { useTranslation } from '@dxos/react-ui';\nimport { SelectInput, type InputProps, useInputProps } from '@dxos/react-ui-form';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nexport type SpecSelectorProps = InputProps;\n\nexport const SpecSelector = (props: SpecSelectorProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const specProps = useInputProps(['spec' satisfies keyof FunctionTriggerType]);\n\n const handleTypeChange = useCallback(\n (_type: any, value: string): TriggerType | undefined => {\n const getDefaultTriggerSpec = (kind: string) => {\n switch (kind) {\n case TriggerKind.Timer:\n return { kind: TriggerKind.Timer, cron: '' };\n case TriggerKind.Subscription:\n return { kind: TriggerKind.Subscription, filter: {} };\n case TriggerKind.Queue:\n return { kind: TriggerKind.Queue, queue: '' };\n case TriggerKind.Email:\n return { kind: TriggerKind.Email };\n case TriggerKind.Webhook:\n return { kind: TriggerKind.Webhook };\n default:\n return undefined;\n }\n };\n\n const defaultSpec = getDefaultTriggerSpec(value);\n if (!defaultSpec) {\n return;\n }\n\n // Update the entire spec object, not just the `spec.kind`.\n specProps.onValueChange('object', defaultSpec);\n },\n [specProps],\n );\n\n const options = useMemo(\n () =>\n Object.values(TriggerKind).map((kind) => ({\n value: kind,\n label: t(`trigger type ${kind}`),\n })),\n [t],\n );\n\n return <SelectInput {...props} options={options} onValueChange={handleTypeChange} />;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAA4C;AAE5C,uBAA6B;AAC7B,kBAAoB;AACpB,uBAMO;AACP,IAAAA,eAAkD;AAClD,sBAA+B;AAC/B,2BAAiF;ACbjF,IAAAC,gBAA4C;AAE5C,yBAAuD;AAEvD,IAAAC,mBAAgC;AAChC,IAAAC,wBAAoF;ACLpF,IAAAF,gBAA4C;AAE5C,IAAAG,oBAAwE;AACxE,IAAAF,mBAA+B;AAC/B,IAAAC,wBAA4D;ADWrD,IAAME,sBAAsB,CAAC,EAClCC,WACAC,UACAC,eACAC,kBAAiB,MACQ;AACzB,QAAMC,4BAAwBC,qCAAc;IAAC;GAAuB;AACpE,QAAMC,yBAAqBC,uBAAQ,MAAA;AACjC,QAAIH,iCAAiCI,4BAAS;AAC5C,aAAOJ,sBAAsBK,IAAIC,SAAQ,EAAGC,MAAM,aAAA,EAAeC,GAAG,CAAA;IACtE;EACF,GAAG;IAACR;GAAsB;AAE1B,QAAMS,uBAAmBN,uBACvB,MAAMP,UAAUc,KAAK,CAACC,MAAMA,EAAEC,OAAOV,kBAAAA,GACrC;IAACN;IAAWM;GAAmB;AAGjCW;;IAEEb;IACA,CAACc,cAAcA,cAAcC,UAAaD,cAAcd;IACxD,CAACgB,cAAcA,cAAcD;IAC7B,MAAMjB,cAAc,UAAU,CAAC,CAAA;EAAA;AAGjC,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OAAOoC,SAASC,EAAAA;IAAKpD,OAAO,cAAcoD,GAAGpF,EAAE;EAAG,EAAA;AACpF;",
6
+ "names": ["import_echo", "import_react", "import_react_ui", "import_react_ui_form", "import_functions", "FunctionInputEditor", "functions", "getValue", "onValueChange", "onQueryRefOptions", "selectedFunctionValue", "useFormValues", "selectedFunctionId", "useMemo", "RefImpl", "dxn", "toString", "split", "at", "selectedFunction", "find", "f", "id", "useOnTransition", "prevValue", "undefined", "currValue", "inputSchema", "effectSchema", "toEffectSchema", "propertyCount", "properties", "Object", "keys", "length", "values", "handleValuesChanged", "useCallback", "React", "h3", "className", "Form", "schema", "classNames", "onValuesChanged", "SpecSelector", "props", "t", "useTranslation", "AUTOMATION_PLUGIN", "specProps", "useInputProps", "handleTypeChange", "_type", "value", "getDefaultTriggerSpec", "kind", "TriggerKind", "Timer", "cron", "Subscription", "filter", "Queue", "queue", "Email", "Webhook", "defaultSpec", "options", "map", "label", "SelectInput", "TriggerEditor", "space", "trigger", "onSave", "onCancel", "useQuery", "Filter", "type", "FunctionType", "workflows", "ComputeGraph", "scripts", "ScriptType", "handleSave", "handleRefQueryLookup", "useRefQueryLookupHandler", "Custom", "formValue", "Ref", "isRef", "handleOnValueChange", "dxnString", "DXN", "parse", "ref", "fromDXN", "getWorkflowOptions", "concat", "getFunctionOptions", "div", "role", "FunctionTriggerSchema", "graphs", "graph", "getLabel", "fn", "s", "source", "target", "name"]
7
+ }
@@ -26,19 +26,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_L5TWLPGA_exports = {};
30
- __export(chunk_L5TWLPGA_exports, {
29
+ var chunk_SV2CB3FT_exports = {};
30
+ __export(chunk_SV2CB3FT_exports, {
31
31
  AutomationContainer: () => AutomationContainer,
32
32
  AutomationPanel: () => AutomationPanel,
33
33
  FunctionsContainer: () => FunctionsContainer,
34
34
  FunctionsPanel: () => FunctionsPanel
35
35
  });
36
- module.exports = __toCommonJS(chunk_L5TWLPGA_exports);
36
+ module.exports = __toCommonJS(chunk_SV2CB3FT_exports);
37
37
  var import_react = require("react");
38
- var AutomationContainer = (0, import_react.lazy)(() => import("./AutomationContainer-E5I76FPP.cjs"));
39
- var AutomationPanel = (0, import_react.lazy)(() => import("./AutomationPanel-YLXAFJDP.cjs"));
40
- var FunctionsContainer = (0, import_react.lazy)(() => import("./FunctionsContainer-3HCURMEB.cjs"));
41
- var FunctionsPanel = (0, import_react.lazy)(() => import("./FunctionsPanel-SYIZHPGU.cjs"));
38
+ var AutomationContainer = (0, import_react.lazy)(() => import("./AutomationContainer-FIFH4P5T.cjs"));
39
+ var AutomationPanel = (0, import_react.lazy)(() => import("./AutomationPanel-HTNEWBGB.cjs"));
40
+ var FunctionsContainer = (0, import_react.lazy)(() => import("./FunctionsContainer-LF2F6CPE.cjs"));
41
+ var FunctionsPanel = (0, import_react.lazy)(() => import("./FunctionsPanel-6HOAIMQ3.cjs"));
42
42
  // Annotate the CommonJS export names for ESM import in node:
43
43
  0 && (module.exports = {
44
44
  AutomationContainer,
@@ -46,4 +46,4 @@ var FunctionsPanel = (0, import_react.lazy)(() => import("./FunctionsPanel-SYIZH
46
46
  FunctionsContainer,
47
47
  FunctionsPanel
48
48
  });
49
- //# sourceMappingURL=chunk-L5TWLPGA.cjs.map
49
+ //# sourceMappingURL=chunk-SV2CB3FT.cjs.map