@dxos/plugin-automation 0.8.2-staging.7ac8446 → 0.8.2

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 (179) hide show
  1. package/dist/lib/browser/AutomationContainer-HQK7FTN6.mjs +40 -0
  2. package/dist/lib/browser/AutomationContainer-HQK7FTN6.mjs.map +7 -0
  3. package/dist/lib/browser/AutomationPanel-GU37N5LO.mjs +11 -0
  4. package/dist/lib/browser/AutomationPanel-GU37N5LO.mjs.map +7 -0
  5. package/dist/lib/browser/FunctionsContainer-B7RDWVMX.mjs +39 -0
  6. package/dist/lib/browser/FunctionsContainer-B7RDWVMX.mjs.map +7 -0
  7. package/dist/lib/browser/FunctionsPanel-LCCPDIT6.mjs +10 -0
  8. package/dist/lib/browser/FunctionsPanel-LCCPDIT6.mjs.map +7 -0
  9. package/dist/lib/browser/app-graph-builder-BYECL42X.mjs +80 -0
  10. package/dist/lib/browser/app-graph-builder-BYECL42X.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-4E2KPMLB.mjs +39 -0
  12. package/dist/lib/browser/chunk-4E2KPMLB.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-4QTXMPBC.mjs +229 -0
  14. package/dist/lib/browser/chunk-4QTXMPBC.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-D2ESAYQD.mjs +149 -0
  16. package/dist/lib/browser/chunk-D2ESAYQD.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-ELQ2FX5G.mjs +14 -0
  18. package/dist/lib/browser/chunk-ELQ2FX5G.mjs.map +7 -0
  19. package/dist/lib/browser/{chunk-WKKQV4PC.mjs → chunk-IHAKPP5A.mjs} +2 -2
  20. package/dist/lib/browser/{chunk-WKKQV4PC.mjs.map → chunk-IHAKPP5A.mjs.map} +1 -1
  21. package/dist/lib/browser/chunk-ZTRYR6RJ.mjs +94 -0
  22. package/dist/lib/browser/chunk-ZTRYR6RJ.mjs.map +7 -0
  23. package/dist/lib/browser/index.mjs +26 -20
  24. package/dist/lib/browser/index.mjs.map +3 -3
  25. package/dist/lib/browser/intent-resolver-ZRBBYZUX.mjs +77 -0
  26. package/dist/lib/browser/intent-resolver-ZRBBYZUX.mjs.map +7 -0
  27. package/dist/lib/browser/meta.json +1 -1
  28. package/dist/lib/browser/react-surface-VKO6PA2P.mjs +68 -0
  29. package/dist/lib/browser/react-surface-VKO6PA2P.mjs.map +7 -0
  30. package/dist/lib/browser/types.mjs +8 -0
  31. package/dist/lib/browser/types.mjs.map +7 -0
  32. package/dist/lib/node/AutomationContainer-5J7LJK7L.cjs +68 -0
  33. package/dist/lib/node/AutomationContainer-5J7LJK7L.cjs.map +7 -0
  34. package/dist/lib/node/AutomationPanel-NPDBUQ7D.cjs +32 -0
  35. package/dist/lib/node/AutomationPanel-NPDBUQ7D.cjs.map +7 -0
  36. package/dist/lib/node/FunctionsContainer-LNLDZUZ6.cjs +67 -0
  37. package/dist/lib/node/FunctionsContainer-LNLDZUZ6.cjs.map +7 -0
  38. package/dist/lib/node/FunctionsPanel-7AOXIQMA.cjs +31 -0
  39. package/dist/lib/node/FunctionsPanel-7AOXIQMA.cjs.map +7 -0
  40. package/dist/lib/node/app-graph-builder-DUKR2BRB.cjs +96 -0
  41. package/dist/lib/node/app-graph-builder-DUKR2BRB.cjs.map +7 -0
  42. package/dist/lib/node/{chunk-7GXNXMSM.cjs → chunk-3EF7MLFX.cjs} +5 -5
  43. package/dist/lib/node/{chunk-7GXNXMSM.cjs.map → chunk-3EF7MLFX.cjs.map} +1 -1
  44. package/dist/lib/node/chunk-4O627QZU.cjs +175 -0
  45. package/dist/lib/node/chunk-4O627QZU.cjs.map +7 -0
  46. package/dist/lib/node/{chunk-AGJ6XTDN.cjs → chunk-DOLMQUQ5.cjs} +16 -7
  47. package/dist/lib/node/chunk-DOLMQUQ5.cjs.map +7 -0
  48. package/dist/lib/node/chunk-GIIVTK4O.cjs +58 -0
  49. package/dist/lib/node/chunk-GIIVTK4O.cjs.map +7 -0
  50. package/dist/lib/node/chunk-O42NQYQT.cjs +252 -0
  51. package/dist/lib/node/chunk-O42NQYQT.cjs.map +7 -0
  52. package/dist/lib/node/chunk-WXQAVUBJ.cjs +122 -0
  53. package/dist/lib/node/chunk-WXQAVUBJ.cjs.map +7 -0
  54. package/dist/lib/node/index.cjs +37 -31
  55. package/dist/lib/node/index.cjs.map +3 -3
  56. package/dist/lib/node/intent-resolver-JC4Q4TYU.cjs +93 -0
  57. package/dist/lib/node/intent-resolver-JC4Q4TYU.cjs.map +7 -0
  58. package/dist/lib/node/meta.json +1 -1
  59. package/dist/lib/node/{react-surface-52M54VWV.cjs → react-surface-HB3MYTCK.cjs} +41 -17
  60. package/dist/lib/node/react-surface-HB3MYTCK.cjs.map +7 -0
  61. package/dist/lib/node/types.cjs +30 -0
  62. package/dist/lib/node/types.cjs.map +7 -0
  63. package/dist/lib/node-esm/AutomationContainer-OJGH76X2.mjs +41 -0
  64. package/dist/lib/node-esm/AutomationContainer-OJGH76X2.mjs.map +7 -0
  65. package/dist/lib/node-esm/AutomationPanel-HIWEJUWL.mjs +12 -0
  66. package/dist/lib/node-esm/AutomationPanel-HIWEJUWL.mjs.map +7 -0
  67. package/dist/lib/node-esm/FunctionsContainer-PPR6XNNR.mjs +40 -0
  68. package/dist/lib/node-esm/FunctionsContainer-PPR6XNNR.mjs.map +7 -0
  69. package/dist/lib/node-esm/FunctionsPanel-SBXKWTHR.mjs +11 -0
  70. package/dist/lib/node-esm/FunctionsPanel-SBXKWTHR.mjs.map +7 -0
  71. package/dist/lib/node-esm/app-graph-builder-UAXHKKGW.mjs +81 -0
  72. package/dist/lib/node-esm/app-graph-builder-UAXHKKGW.mjs.map +7 -0
  73. package/dist/lib/node-esm/chunk-5IAHBEHR.mjs +95 -0
  74. package/dist/lib/node-esm/chunk-5IAHBEHR.mjs.map +7 -0
  75. package/dist/lib/node-esm/chunk-6JOJ2NN4.mjs +40 -0
  76. package/dist/lib/node-esm/chunk-6JOJ2NN4.mjs.map +7 -0
  77. package/dist/lib/node-esm/chunk-D5HK4XLC.mjs +230 -0
  78. package/dist/lib/node-esm/chunk-D5HK4XLC.mjs.map +7 -0
  79. package/dist/lib/node-esm/{chunk-DZ44LGYT.mjs → chunk-HCCLRNMJ.mjs} +2 -2
  80. package/dist/lib/node-esm/{chunk-DZ44LGYT.mjs.map → chunk-HCCLRNMJ.mjs.map} +1 -1
  81. package/dist/lib/node-esm/chunk-P2FKMPRE.mjs +150 -0
  82. package/dist/lib/node-esm/chunk-P2FKMPRE.mjs.map +7 -0
  83. package/dist/lib/node-esm/chunk-Z7VAQDEE.mjs +16 -0
  84. package/dist/lib/node-esm/chunk-Z7VAQDEE.mjs.map +7 -0
  85. package/dist/lib/node-esm/index.mjs +26 -20
  86. package/dist/lib/node-esm/index.mjs.map +3 -3
  87. package/dist/lib/node-esm/intent-resolver-KRCXJEDR.mjs +78 -0
  88. package/dist/lib/node-esm/intent-resolver-KRCXJEDR.mjs.map +7 -0
  89. package/dist/lib/node-esm/meta.json +1 -1
  90. package/dist/lib/node-esm/react-surface-TRKCIZAB.mjs +69 -0
  91. package/dist/lib/node-esm/react-surface-TRKCIZAB.mjs.map +7 -0
  92. package/dist/lib/node-esm/types.mjs +9 -0
  93. package/dist/lib/node-esm/types.mjs.map +7 -0
  94. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  95. package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
  96. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  97. package/dist/types/src/capabilities/index.d.ts +2 -177
  98. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
  100. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  102. package/dist/types/src/components/AutomationContainer.d.ts +7 -0
  103. package/dist/types/src/components/AutomationContainer.d.ts.map +1 -0
  104. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +6 -3
  105. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  106. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  107. package/dist/types/src/components/AutomationPanel/index.d.ts +1 -0
  108. package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -1
  109. package/dist/types/src/components/FunctionsContainer.d.ts +7 -0
  110. package/dist/types/src/components/FunctionsContainer.d.ts.map +1 -0
  111. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts +7 -0
  112. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -0
  113. package/dist/types/src/components/FunctionsPanel/index.d.ts +4 -0
  114. package/dist/types/src/components/FunctionsPanel/index.d.ts.map +1 -0
  115. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +12 -0
  116. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -0
  117. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +5 -0
  118. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -0
  119. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -1
  120. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  121. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  122. package/dist/types/src/components/index.d.ts +8 -1
  123. package/dist/types/src/components/index.d.ts.map +1 -1
  124. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  125. package/dist/types/src/translations.d.ts +8 -0
  126. package/dist/types/src/translations.d.ts.map +1 -1
  127. package/dist/types/src/types.d.ts +25 -0
  128. package/dist/types/src/types.d.ts.map +1 -0
  129. package/dist/types/tsconfig.tsbuildinfo +1 -1
  130. package/package.json +38 -25
  131. package/src/AutomationPlugin.tsx +5 -10
  132. package/src/capabilities/app-graph-builder.ts +72 -17
  133. package/src/capabilities/index.ts +1 -0
  134. package/src/capabilities/intent-resolver.ts +73 -0
  135. package/src/capabilities/react-surface.tsx +32 -8
  136. package/src/components/AutomationContainer.tsx +31 -0
  137. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +6 -5
  138. package/src/components/AutomationPanel/AutomationPanel.tsx +77 -73
  139. package/src/components/AutomationPanel/index.ts +2 -0
  140. package/src/components/FunctionsContainer.tsx +31 -0
  141. package/src/components/FunctionsPanel/FunctionsPanel.tsx +95 -0
  142. package/src/components/FunctionsPanel/index.ts +8 -0
  143. package/src/components/TriggerEditor/FunctionInputEditor.tsx +77 -0
  144. package/src/components/TriggerEditor/SpecSelector.tsx +59 -0
  145. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +19 -10
  146. package/src/components/TriggerEditor/TriggerEditor.tsx +64 -102
  147. package/src/components/index.ts +3 -0
  148. package/src/meta.ts +1 -1
  149. package/src/testing/test-functions.ts +23 -9
  150. package/src/translations.ts +10 -1
  151. package/src/types.ts +33 -0
  152. package/dist/lib/browser/AutomationPanel-YAHFXQX6.mjs +0 -139
  153. package/dist/lib/browser/AutomationPanel-YAHFXQX6.mjs.map +0 -7
  154. package/dist/lib/browser/app-graph-builder-K3BIQFWW.mjs +0 -40
  155. package/dist/lib/browser/app-graph-builder-K3BIQFWW.mjs.map +0 -7
  156. package/dist/lib/browser/chunk-FALBBJNO.mjs +0 -138
  157. package/dist/lib/browser/chunk-FALBBJNO.mjs.map +0 -7
  158. package/dist/lib/browser/chunk-MT3FZH4V.mjs +0 -8
  159. package/dist/lib/browser/chunk-MT3FZH4V.mjs.map +0 -7
  160. package/dist/lib/browser/react-surface-4QQSJR4A.mjs +0 -42
  161. package/dist/lib/browser/react-surface-4QQSJR4A.mjs.map +0 -7
  162. package/dist/lib/node/AutomationPanel-ZKAMIU6O.cjs +0 -161
  163. package/dist/lib/node/AutomationPanel-ZKAMIU6O.cjs.map +0 -7
  164. package/dist/lib/node/app-graph-builder-HO4FPGZ5.cjs +0 -56
  165. package/dist/lib/node/app-graph-builder-HO4FPGZ5.cjs.map +0 -7
  166. package/dist/lib/node/chunk-AGJ6XTDN.cjs.map +0 -7
  167. package/dist/lib/node/chunk-FTEDH5Q6.cjs +0 -167
  168. package/dist/lib/node/chunk-FTEDH5Q6.cjs.map +0 -7
  169. package/dist/lib/node/react-surface-52M54VWV.cjs.map +0 -7
  170. package/dist/lib/node-esm/AutomationPanel-XF7YPSKM.mjs +0 -140
  171. package/dist/lib/node-esm/AutomationPanel-XF7YPSKM.mjs.map +0 -7
  172. package/dist/lib/node-esm/app-graph-builder-XCJR33VS.mjs +0 -41
  173. package/dist/lib/node-esm/app-graph-builder-XCJR33VS.mjs.map +0 -7
  174. package/dist/lib/node-esm/chunk-M4QXMIIB.mjs +0 -139
  175. package/dist/lib/node-esm/chunk-M4QXMIIB.mjs.map +0 -7
  176. package/dist/lib/node-esm/chunk-OA75PSGH.mjs +0 -10
  177. package/dist/lib/node-esm/chunk-OA75PSGH.mjs.map +0 -7
  178. package/dist/lib/node-esm/react-surface-MGKM3OO3.mjs +0 -43
  179. package/dist/lib/node-esm/react-surface-MGKM3OO3.mjs.map +0 -7
@@ -26,41 +26,65 @@ 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 react_surface_52M54VWV_exports = {};
30
- __export(react_surface_52M54VWV_exports, {
29
+ var react_surface_HB3MYTCK_exports = {};
30
+ __export(react_surface_HB3MYTCK_exports, {
31
31
  default: () => react_surface_default
32
32
  });
33
- module.exports = __toCommonJS(react_surface_52M54VWV_exports);
34
- var import_chunk_AGJ6XTDN = require("./chunk-AGJ6XTDN.cjs");
35
- var import_chunk_FTEDH5Q6 = require("./chunk-FTEDH5Q6.cjs");
36
- var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
33
+ module.exports = __toCommonJS(react_surface_HB3MYTCK_exports);
34
+ var import_chunk_DOLMQUQ5 = require("./chunk-DOLMQUQ5.cjs");
35
+ var import_chunk_O42NQYQT = require("./chunk-O42NQYQT.cjs");
36
+ var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
37
37
  var import_react = __toESM(require("react"));
38
38
  var import_app_framework = require("@dxos/app-framework");
39
39
  var import_echo_schema = require("@dxos/echo-schema");
40
- var import_types = require("@dxos/functions/types");
40
+ var import_functions = require("@dxos/functions");
41
41
  var import_echo = require("@dxos/react-client/echo");
42
42
  var import_react_ui_stack = require("@dxos/react-ui-stack");
43
43
  var react_surface_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, [
44
44
  (0, import_app_framework.createSurface)({
45
- id: `${import_chunk_7GXNXMSM.meta.id}/automation`,
46
- role: "space-settings--automation",
47
- filter: (data) => (0, import_echo.isSpace)(data.subject),
48
- component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_AGJ6XTDN.AutomationPanel, {
49
- space: data.subject
50
- })
45
+ id: `${import_chunk_3EF7MLFX.meta.id}/space-settings-automation`,
46
+ role: "article",
47
+ filter: (data) => data.subject === `${import_chunk_3EF7MLFX.meta.id}/space-settings-automation`,
48
+ component: () => {
49
+ const layout = (0, import_app_framework.useLayout)();
50
+ const { spaceId } = (0, import_echo.parseId)(layout.workspace);
51
+ const space = (0, import_echo.useSpace)(spaceId);
52
+ if (!space || !spaceId) {
53
+ return null;
54
+ }
55
+ return /* @__PURE__ */ import_react.default.createElement(import_chunk_DOLMQUQ5.AutomationContainer, {
56
+ space
57
+ });
58
+ }
59
+ }),
60
+ (0, import_app_framework.createSurface)({
61
+ id: `${import_chunk_3EF7MLFX.meta.id}/space-settings-functions`,
62
+ role: "article",
63
+ filter: (data) => data.subject === `${import_chunk_3EF7MLFX.meta.id}/space-settings-functions`,
64
+ component: () => {
65
+ const layout = (0, import_app_framework.useLayout)();
66
+ const { spaceId } = (0, import_echo.parseId)(layout.workspace);
67
+ const space = (0, import_echo.useSpace)(spaceId);
68
+ if (!space || !spaceId) {
69
+ return null;
70
+ }
71
+ return /* @__PURE__ */ import_react.default.createElement(import_chunk_DOLMQUQ5.FunctionsContainer, {
72
+ space
73
+ });
74
+ }
51
75
  }),
52
76
  (0, import_app_framework.createSurface)({
53
- id: `${import_chunk_7GXNXMSM.meta.id}/companion/automation`,
77
+ id: `${import_chunk_3EF7MLFX.meta.id}/companion/automation`,
54
78
  role: "article",
55
- filter: (data) => (0, import_echo_schema.isInstanceOf)(import_types.ScriptType, data.companionTo) && data.subject === "automation",
79
+ filter: (data) => (0, import_echo_schema.isInstanceOf)(import_functions.ScriptType, data.companionTo) && data.subject === "automation",
56
80
  component: ({ data, role }) => {
57
81
  return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.StackItem.Content, {
58
82
  role
59
- }, /* @__PURE__ */ import_react.default.createElement(import_chunk_AGJ6XTDN.AutomationPanel, {
83
+ }, /* @__PURE__ */ import_react.default.createElement(import_chunk_DOLMQUQ5.AutomationPanel, {
60
84
  space: (0, import_echo.getSpace)(data.companionTo),
61
85
  object: data.companionTo
62
86
  }));
63
87
  }
64
88
  })
65
89
  ]);
66
- //# sourceMappingURL=react-surface-52M54VWV.cjs.map
90
+ //# sourceMappingURL=react-surface-HB3MYTCK.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface, useLayout } from '@dxos/app-framework';\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { ScriptType } from '@dxos/functions';\nimport { getSpace, parseId, useSpace } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { AutomationContainer, AutomationPanel, FunctionsContainer } from '../components';\nimport { meta } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${meta.id}/space-settings-automation`,\n role: 'article',\n filter: (data): data is { subject: string } => data.subject === `${meta.id}/space-settings-automation`,\n component: () => {\n const layout = useLayout();\n const { spaceId } = parseId(layout.workspace);\n const space = useSpace(spaceId);\n if (!space || !spaceId) {\n return null;\n }\n\n return <AutomationContainer space={space} />;\n },\n }),\n createSurface({\n id: `${meta.id}/space-settings-functions`,\n role: 'article',\n filter: (data): data is { subject: string } => data.subject === `${meta.id}/space-settings-functions`,\n component: () => {\n const layout = useLayout();\n const { spaceId } = parseId(layout.workspace);\n const space = useSpace(spaceId);\n if (!space || !spaceId) {\n return null;\n }\n\n return <FunctionsContainer space={space} />;\n },\n }),\n createSurface({\n id: `${meta.id}/companion/automation`,\n role: 'article',\n filter: (data): data is { companionTo: ScriptType; subject: 'automation' } =>\n isInstanceOf(ScriptType, data.companionTo) && data.subject === 'automation',\n component: ({ data, role }) => {\n return (\n <StackItem.Content role={role}>\n <AutomationPanel space={getSpace(data.companionTo)!} object={data.companionTo} />\n </StackItem.Content>\n );\n },\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAAoE;AACpE,yBAA6B;AAC7B,uBAA2B;AAC3B,kBAA4C;AAC5C,4BAA0B;AAK1B,IAAA,wBAAe,UACbA,kCAAYC,kCAAaC,cAAc;MACrCC,oCAAc;IACZC,IAAI,GAAGC,2BAAKD,EAAE;IACdE,MAAM;IACNC,QAAQ,CAACC,SAAsCA,KAAKC,YAAY,GAAGJ,2BAAKD,EAAE;IAC1EM,WAAW,MAAA;AACT,YAAMC,aAASC,gCAAAA;AACf,YAAM,EAAEC,QAAO,QAAKC,qBAAQH,OAAOI,SAAS;AAC5C,YAAMC,YAAQC,sBAASJ,OAAAA;AACvB,UAAI,CAACG,SAAS,CAACH,SAAS;AACtB,eAAO;MACT;AAEA,aAAO,6BAAAK,QAAA,cAACC,2CAAAA;QAAoBH;;IAC9B;EACF,CAAA;MACAb,oCAAc;IACZC,IAAI,GAAGC,2BAAKD,EAAE;IACdE,MAAM;IACNC,QAAQ,CAACC,SAAsCA,KAAKC,YAAY,GAAGJ,2BAAKD,EAAE;IAC1EM,WAAW,MAAA;AACT,YAAMC,aAASC,gCAAAA;AACf,YAAM,EAAEC,QAAO,QAAKC,qBAAQH,OAAOI,SAAS;AAC5C,YAAMC,YAAQC,sBAASJ,OAAAA;AACvB,UAAI,CAACG,SAAS,CAACH,SAAS;AACtB,eAAO;MACT;AAEA,aAAO,6BAAAK,QAAA,cAACE,0CAAAA;QAAmBJ;;IAC7B;EACF,CAAA;MACAb,oCAAc;IACZC,IAAI,GAAGC,2BAAKD,EAAE;IACdE,MAAM;IACNC,QAAQ,CAACC,aACPa,iCAAaC,6BAAYd,KAAKe,WAAW,KAAKf,KAAKC,YAAY;IACjEC,WAAW,CAAC,EAAEF,MAAMF,KAAI,MAAE;AACxB,aACE,6BAAAY,QAAA,cAACM,gCAAUC,SAAO;QAACnB;SACjB,6BAAAY,QAAA,cAACQ,uCAAAA;QAAgBV,WAAOW,sBAASnB,KAAKe,WAAW;QAAIK,QAAQpB,KAAKe;;IAGxE;EACF,CAAA;CACD;",
6
+ "names": ["contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "subject", "component", "layout", "useLayout", "spaceId", "parseId", "workspace", "space", "useSpace", "React", "AutomationContainer", "FunctionsContainer", "isInstanceOf", "ScriptType", "companionTo", "StackItem", "Content", "AutomationPanel", "getSpace", "object"]
7
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var types_exports = {};
20
+ __export(types_exports, {
21
+ AutomationAction: () => import_chunk_GIIVTK4O.AutomationAction
22
+ });
23
+ module.exports = __toCommonJS(types_exports);
24
+ var import_chunk_GIIVTK4O = require("./chunk-GIIVTK4O.cjs");
25
+ var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
26
+ // Annotate the CommonJS export names for ESM import in node:
27
+ 0 && (module.exports = {
28
+ AutomationAction
29
+ });
30
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["types.cjs"],
4
+ "sourcesContent": ["import {\n AutomationAction\n} from \"./chunk-GIIVTK4O.cjs\";\nimport \"./chunk-3EF7MLFX.cjs\";\nexport {\n AutomationAction\n};\n//# sourceMappingURL=types.cjs.map\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAEO;AACP,4BAAO;",
6
+ "names": []
7
+ }
@@ -0,0 +1,41 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ AutomationPanel
4
+ } from "./chunk-P2FKMPRE.mjs";
5
+ import "./chunk-D5HK4XLC.mjs";
6
+ import {
7
+ AUTOMATION_PLUGIN
8
+ } from "./chunk-HCCLRNMJ.mjs";
9
+
10
+ // packages/plugins/plugin-automation/src/components/AutomationContainer.tsx
11
+ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
12
+ import React from "react";
13
+ import { useTranslation } from "@dxos/react-ui";
14
+ import { ControlSection, ControlPage } from "@dxos/react-ui-form";
15
+ import { StackItem } from "@dxos/react-ui-stack";
16
+ var AutomationContainer = ({ space }) => {
17
+ var _effect = _useSignals();
18
+ try {
19
+ const { t } = useTranslation(AUTOMATION_PLUGIN);
20
+ return /* @__PURE__ */ React.createElement(StackItem.Content, {
21
+ classNames: "block overflow-y-auto"
22
+ }, /* @__PURE__ */ React.createElement(ControlPage, null, /* @__PURE__ */ React.createElement(ControlSection, {
23
+ title: t("automation verbose label", {
24
+ ns: AUTOMATION_PLUGIN
25
+ }),
26
+ description: t("automation description", {
27
+ ns: AUTOMATION_PLUGIN
28
+ })
29
+ }, /* @__PURE__ */ React.createElement(AutomationPanel, {
30
+ space
31
+ }))));
32
+ } finally {
33
+ _effect.f();
34
+ }
35
+ };
36
+ var AutomationContainer_default = AutomationContainer;
37
+ export {
38
+ AutomationContainer,
39
+ AutomationContainer_default as default
40
+ };
41
+ //# sourceMappingURL=AutomationContainer-OJGH76X2.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/AutomationContainer.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlSection, ControlPage } from '@dxos/react-ui-form';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { AutomationPanel } from './AutomationPanel';\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport const AutomationContainer = ({ space }: { space: Space }) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n return (\n <StackItem.Content classNames='block overflow-y-auto'>\n <ControlPage>\n <ControlSection\n title={t('automation verbose label', { ns: AUTOMATION_PLUGIN })}\n description={t('automation description', { ns: AUTOMATION_PLUGIN })}\n >\n <AutomationPanel space={space} />\n </ControlSection>\n </ControlPage>\n </StackItem.Content>\n );\n};\n\nexport default AutomationContainer;\n"],
5
+ "mappings": ";;;;;;;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,sBAAsB;AAC/B,SAASC,gBAAgBC,mBAAmB;AAC5C,SAASC,iBAAiB;AAKnB,IAAMC,sBAAsB,CAAC,EAAEC,MAAK,MAAoB;;;AAC7D,UAAM,EAAEC,EAAC,IAAKC,eAAeC,iBAAAA;AAC7B,WACE,sBAAA,cAACC,UAAUC,SAAO;MAACC,YAAW;OAC5B,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;MACCC,OAAOR,EAAE,4BAA4B;QAAES,IAAIP;MAAkB,CAAA;MAC7DQ,aAAaV,EAAE,0BAA0B;QAAES,IAAIP;MAAkB,CAAA;OAEjE,sBAAA,cAACS,iBAAAA;MAAgBZ;;;;;AAK3B;AAEA,IAAA,8BAAeD;",
6
+ "names": ["React", "useTranslation", "ControlSection", "ControlPage", "StackItem", "AutomationContainer", "space", "t", "useTranslation", "AUTOMATION_PLUGIN", "StackItem", "Content", "classNames", "ControlPage", "ControlSection", "title", "ns", "description", "AutomationPanel"]
7
+ }
@@ -0,0 +1,12 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ AutomationPanel,
4
+ AutomationPanel_default
5
+ } from "./chunk-P2FKMPRE.mjs";
6
+ import "./chunk-D5HK4XLC.mjs";
7
+ import "./chunk-HCCLRNMJ.mjs";
8
+ export {
9
+ AutomationPanel,
10
+ AutomationPanel_default as default
11
+ };
12
+ //# sourceMappingURL=AutomationPanel-HIWEJUWL.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,40 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ FunctionsPanel
4
+ } from "./chunk-5IAHBEHR.mjs";
5
+ import {
6
+ AUTOMATION_PLUGIN
7
+ } from "./chunk-HCCLRNMJ.mjs";
8
+
9
+ // packages/plugins/plugin-automation/src/components/FunctionsContainer.tsx
10
+ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
11
+ import React from "react";
12
+ import { useTranslation } from "@dxos/react-ui";
13
+ import { ControlPage, ControlSection } from "@dxos/react-ui-form";
14
+ import { StackItem } from "@dxos/react-ui-stack";
15
+ var FunctionsContainer = ({ space }) => {
16
+ var _effect = _useSignals();
17
+ try {
18
+ const { t } = useTranslation(AUTOMATION_PLUGIN);
19
+ return /* @__PURE__ */ React.createElement(StackItem.Content, {
20
+ classNames: "block overflow-y-auto"
21
+ }, /* @__PURE__ */ React.createElement(ControlPage, null, /* @__PURE__ */ React.createElement(ControlSection, {
22
+ title: t("functions verbose label", {
23
+ ns: AUTOMATION_PLUGIN
24
+ }),
25
+ description: t("functions description", {
26
+ ns: AUTOMATION_PLUGIN
27
+ })
28
+ }, /* @__PURE__ */ React.createElement(FunctionsPanel, {
29
+ space
30
+ }))));
31
+ } finally {
32
+ _effect.f();
33
+ }
34
+ };
35
+ var FunctionsContainer_default = FunctionsContainer;
36
+ export {
37
+ FunctionsContainer,
38
+ FunctionsContainer_default as default
39
+ };
40
+ //# sourceMappingURL=FunctionsContainer-PPR6XNNR.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/FunctionsContainer.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlPage, ControlSection } from '@dxos/react-ui-form';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { FunctionsPanel } from './FunctionsPanel';\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport const FunctionsContainer = ({ space }: { space: Space }) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n return (\n <StackItem.Content classNames='block overflow-y-auto'>\n <ControlPage>\n <ControlSection\n title={t('functions verbose label', { ns: AUTOMATION_PLUGIN })}\n description={t('functions description', { ns: AUTOMATION_PLUGIN })}\n >\n <FunctionsPanel space={space} />\n </ControlSection>\n </ControlPage>\n </StackItem.Content>\n );\n};\n\nexport default FunctionsContainer;\n"],
5
+ "mappings": ";;;;;;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,sBAAsB;AAC/B,SAASC,aAAaC,sBAAsB;AAC5C,SAASC,iBAAiB;AAKnB,IAAMC,qBAAqB,CAAC,EAAEC,MAAK,MAAoB;;;AAC5D,UAAM,EAAEC,EAAC,IAAKC,eAAeC,iBAAAA;AAC7B,WACE,sBAAA,cAACC,UAAUC,SAAO;MAACC,YAAW;OAC5B,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;MACCC,OAAOR,EAAE,2BAA2B;QAAES,IAAIP;MAAkB,CAAA;MAC5DQ,aAAaV,EAAE,yBAAyB;QAAES,IAAIP;MAAkB,CAAA;OAEhE,sBAAA,cAACS,gBAAAA;MAAeZ;;;;;AAK1B;AAEA,IAAA,6BAAeD;",
6
+ "names": ["React", "useTranslation", "ControlPage", "ControlSection", "StackItem", "FunctionsContainer", "space", "t", "useTranslation", "AUTOMATION_PLUGIN", "StackItem", "Content", "classNames", "ControlPage", "ControlSection", "title", "ns", "description", "FunctionsPanel"]
7
+ }
@@ -0,0 +1,11 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ FunctionsPanel,
4
+ FunctionsPanel_default
5
+ } from "./chunk-5IAHBEHR.mjs";
6
+ import "./chunk-HCCLRNMJ.mjs";
7
+ export {
8
+ FunctionsPanel,
9
+ FunctionsPanel_default as default
10
+ };
11
+ //# sourceMappingURL=FunctionsPanel-SBXKWTHR.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,81 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ meta
4
+ } from "./chunk-HCCLRNMJ.mjs";
5
+
6
+ // packages/plugins/plugin-automation/src/capabilities/app-graph-builder.ts
7
+ import { Rx } from "@effect-rx/rx-react";
8
+ import { Option, pipe } from "effect";
9
+ import { Capabilities, contributes } from "@dxos/app-framework";
10
+ import { isInstanceOf } from "@dxos/echo-schema";
11
+ import { ScriptType } from "@dxos/functions";
12
+ import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from "@dxos/plugin-deck/types";
13
+ import { createExtension } from "@dxos/plugin-graph";
14
+ import { SPACE_PLUGIN } from "@dxos/plugin-space";
15
+ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, [
16
+ createExtension({
17
+ id: `${meta.id}/space-settings-automation`,
18
+ connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.type === `${SPACE_PLUGIN}/settings` ? Option.some(node2) : Option.none()), Option.map((node2) => [
19
+ {
20
+ id: `automation-${node2.id}`,
21
+ type: `${meta.id}/space-settings-automation`,
22
+ data: `${meta.id}/space-settings-automation`,
23
+ properties: {
24
+ label: [
25
+ "automation panel label",
26
+ {
27
+ ns: meta.id
28
+ }
29
+ ],
30
+ icon: "ph--lightning--regular"
31
+ }
32
+ }
33
+ ]), Option.getOrElse(() => [])))
34
+ }),
35
+ createExtension({
36
+ id: `${meta.id}/space-settings-functions`,
37
+ connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.type === `${SPACE_PLUGIN}/settings` ? Option.some(node2) : Option.none()), Option.map((node2) => [
38
+ {
39
+ id: `functions-${node2.id}`,
40
+ type: `${meta.id}/space-settings-functions`,
41
+ data: `${meta.id}/space-settings-functions`,
42
+ properties: {
43
+ label: [
44
+ "functions panel label",
45
+ {
46
+ ns: meta.id
47
+ }
48
+ ],
49
+ icon: "ph--function--regular"
50
+ }
51
+ }
52
+ ]), Option.getOrElse(() => [])))
53
+ }),
54
+ createExtension({
55
+ id: `${meta.id}/script-companion`,
56
+ connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => isInstanceOf(ScriptType, node2.data) ? Option.some(node2) : Option.none()), Option.map((node2) => [
57
+ {
58
+ id: [
59
+ node2.id,
60
+ "automation"
61
+ ].join(ATTENDABLE_PATH_SEPARATOR),
62
+ type: PLANK_COMPANION_TYPE,
63
+ data: "automation",
64
+ properties: {
65
+ label: [
66
+ "script automation label",
67
+ {
68
+ ns: meta.id
69
+ }
70
+ ],
71
+ icon: "ph--lightning--regular",
72
+ disposition: "hidden"
73
+ }
74
+ }
75
+ ]), Option.getOrElse(() => [])))
76
+ })
77
+ ]);
78
+ export {
79
+ app_graph_builder_default as default
80
+ };
81
+ //# sourceMappingURL=app-graph-builder-UAXHKKGW.mjs.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 disposition: 'hidden',\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,UAAU;AACnB,SAASC,QAAQC,YAAY;AAE7B,SAASC,cAAcC,mBAAuC;AAC9D,SAASC,oBAAoB;AAC7B,SAASC,kBAAkB;AAC3B,SAASC,sBAAsBC,iCAAiC;AAChE,SAASC,uBAAuB;AAChC,SAASC,oBAAoB;AAI7B,IAAA,4BAAe,CAACC,YACdC,YAAYC,aAAaC,iBAAiB;EACxCC,gBAAgB;IACdC,IAAI,GAAGC,KAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKO,SAAS,GAAGC,YAAAA,cAA0BH,OAAOI,KAAKT,KAAAA,IAAQK,OAAOK,KAAI,CAAA,GACpGL,OAAOM,IAAI,CAACX,UAAS;MACnB;QACEH,IAAI,cAAcG,MAAKH,EAAE;QACzBU,MAAM,GAAGT,KAAKD,EAAE;QAChBe,MAAM,GAAGd,KAAKD,EAAE;QAChBgB,YAAY;UACVC,OAAO;YAAC;YAA0B;cAAEC,IAAIjB,KAAKD;YAAG;;UAChDmB,MAAM;QACR;MACF;KACD,GACDX,OAAOY,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;EACArB,gBAAgB;IACdC,IAAI,GAAGC,KAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUA,MAAKO,SAAS,GAAGC,YAAAA,cAA0BH,OAAOI,KAAKT,KAAAA,IAAQK,OAAOK,KAAI,CAAA,GACpGL,OAAOM,IAAI,CAACX,UAAS;MACnB;QACEH,IAAI,aAAaG,MAAKH,EAAE;QACxBU,MAAM,GAAGT,KAAKD,EAAE;QAChBe,MAAM,GAAGd,KAAKD,EAAE;QAChBgB,YAAY;UACVC,OAAO;YAAC;YAAyB;cAAEC,IAAIjB,KAAKD;YAAG;;UAC/CmB,MAAM;QACR;MACF;KACD,GACDX,OAAOY,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;EACArB,gBAAgB;IACdC,IAAI,GAAGC,KAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,GAAGC,KAAK,CAACC,QACPC,KACED,IAAIH,IAAAA,GACJK,OAAOC,QAAQ,CAACN,UAAUkB,aAAaC,YAAYnB,MAAKY,IAAI,IAAIP,OAAOI,KAAKT,KAAAA,IAAQK,OAAOK,KAAI,CAAA,GAC/FL,OAAOM,IAAI,CAACX,UAAS;MACnB;QACEH,IAAI;UAACG,MAAKH;UAAI;UAAcuB,KAAKC,yBAAAA;QACjCd,MAAMe;QACNV,MAAM;QACNC,YAAY;UACVC,OAAO;YAAC;YAA2B;cAAEC,IAAIjB,KAAKD;YAAG;;UACjDmB,MAAM;UACNO,aAAa;QACf;MACF;KACD,GACDlB,OAAOY,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;CACD;",
6
+ "names": ["Rx", "Option", "pipe", "Capabilities", "contributes", "isInstanceOf", "ScriptType", "PLANK_COMPANION_TYPE", "ATTENDABLE_PATH_SEPARATOR", "createExtension", "SPACE_PLUGIN", "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", "disposition"]
7
+ }
@@ -0,0 +1,95 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ AUTOMATION_PLUGIN
4
+ } from "./chunk-HCCLRNMJ.mjs";
5
+
6
+ // packages/plugins/plugin-automation/src/components/FunctionsPanel/FunctionsPanel.tsx
7
+ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
8
+ import { Schema } from "effect";
9
+ import React, { useCallback, useMemo } from "react";
10
+ import { createIntent, LayoutAction, useIntentDispatcher } from "@dxos/app-framework";
11
+ import { FunctionType, ScriptType } from "@dxos/functions";
12
+ import { Filter, fullyQualifiedId, useQuery } from "@dxos/react-client/echo";
13
+ import { Button, useTranslation } from "@dxos/react-ui";
14
+ import { controlItemClasses } from "@dxos/react-ui-form";
15
+ import { List } from "@dxos/react-ui-list";
16
+ import { ghostHover, mx } from "@dxos/react-ui-theme";
17
+ var grid = "grid grid-cols-[1fr_auto] min-bs-[2.5rem]";
18
+ var FunctionsPanel = ({ space }) => {
19
+ var _effect = _useSignals();
20
+ try {
21
+ const { t } = useTranslation(AUTOMATION_PLUGIN);
22
+ const functions = useQuery(space, Filter.type(FunctionType));
23
+ const scripts = useQuery(space, Filter.type(ScriptType));
24
+ const { dispatchPromise: dispatch } = useIntentDispatcher();
25
+ const functionToScriptMap = useMemo(() => functions.reduce((map, func) => {
26
+ const scriptId = func.source?.target?.id;
27
+ if (scriptId) {
28
+ const script = scripts.find((s) => s.id === scriptId);
29
+ if (script) {
30
+ map[func.id] = script;
31
+ }
32
+ }
33
+ return map;
34
+ }, {}), [
35
+ functions,
36
+ scripts
37
+ ]);
38
+ const getScriptName = useCallback((func) => {
39
+ const script = functionToScriptMap[func.id];
40
+ return script?.name;
41
+ }, [
42
+ functionToScriptMap
43
+ ]);
44
+ const handleGoToScript = useCallback((func) => {
45
+ const script = functionToScriptMap[func.id];
46
+ if (script) {
47
+ void dispatch(createIntent(LayoutAction.Open, {
48
+ part: "main",
49
+ subject: [
50
+ fullyQualifiedId(script)
51
+ ]
52
+ }));
53
+ }
54
+ }, [
55
+ functionToScriptMap,
56
+ dispatch
57
+ ]);
58
+ return /* @__PURE__ */ React.createElement("div", {
59
+ role: "none",
60
+ className: mx(controlItemClasses)
61
+ }, /* @__PURE__ */ React.createElement(List.Root, {
62
+ items: functions,
63
+ isItem: Schema.is(FunctionType),
64
+ getId: (func) => func.id
65
+ }, ({ items }) => /* @__PURE__ */ React.createElement("div", {
66
+ role: "list",
67
+ className: "flex flex-col w-full"
68
+ }, items?.map((func) => /* @__PURE__ */ React.createElement(List.Item, {
69
+ key: func.id,
70
+ item: func,
71
+ classNames: mx(grid, ghostHover, "items-center", "pli-2", "min-bs-[3rem]")
72
+ }, /* @__PURE__ */ React.createElement("div", {
73
+ className: "flex flex-col truncate"
74
+ }, /* @__PURE__ */ React.createElement(List.ItemTitle, {
75
+ classNames: "truncate"
76
+ }, func.name), getScriptName(func) && /* @__PURE__ */ React.createElement("div", {
77
+ className: "text-xs text-description truncate"
78
+ }, getScriptName(func))), functionToScriptMap[func.id] && /* @__PURE__ */ React.createElement(Button, {
79
+ onClick: () => handleGoToScript(func)
80
+ }, t("go to function source button label")))))), functions.length === 0 && /* @__PURE__ */ React.createElement("div", {
81
+ className: "text-center plb-4 text-gray-500"
82
+ }, t("no functions found")));
83
+ } finally {
84
+ _effect.f();
85
+ }
86
+ };
87
+
88
+ // packages/plugins/plugin-automation/src/components/FunctionsPanel/index.ts
89
+ var FunctionsPanel_default = FunctionsPanel;
90
+
91
+ export {
92
+ FunctionsPanel,
93
+ FunctionsPanel_default
94
+ };
95
+ //# sourceMappingURL=chunk-5IAHBEHR.mjs.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,SAASA,cAAc;AACvB,OAAOC,SAASC,aAAaC,eAAe;AAE5C,SAASC,cAAcC,cAAcC,2BAA2B;AAChE,SAASC,cAAcC,kBAAkB;AACzC,SAASC,QAAQC,kBAAkBC,gBAA4B;AAC/D,SAASC,QAAQC,sBAAsB;AACvC,SAASC,0BAA0B;AACnC,SAASC,YAAY;AACrB,SAASC,YAAYC,UAAU;AAI/B,IAAMC,OAAO;AAMN,IAAMC,iBAAiB,CAAC,EAAEC,MAAK,MAAuB;;;AAC3D,UAAM,EAAEC,EAAC,IAAKC,eAAeC,iBAAAA;AAC7B,UAAMC,YAAYC,SAASL,OAAOM,OAAOC,KAAKC,YAAAA,CAAAA;AAC9C,UAAMC,UAAUJ,SAASL,OAAOM,OAAOC,KAAKG,UAAAA,CAAAA;AAC5C,UAAM,EAAEC,iBAAiBC,SAAQ,IAAKC,oBAAAA;AAEtC,UAAMC,sBAAsBC,QAC1B,MACEX,UAAUY,OACR,CAACC,KAAKC,SAAAA;AACJ,YAAMC,WAAWD,KAAKE,QAAQC,QAAQC;AACtC,UAAIH,UAAU;AACZ,cAAMI,SAASd,QAAQe,KAAK,CAACC,MAAMA,EAAEH,OAAOH,QAAAA;AAC5C,YAAII,QAAQ;AACVN,cAAIC,KAAKI,EAAE,IAAIC;QACjB;MACF;AACA,aAAON;IACT,GACA,CAAC,CAAA,GAEL;MAACb;MAAWK;KAAQ;AAGtB,UAAMiB,gBAAgBC,YACpB,CAACT,SAAAA;AACC,YAAMK,SAAST,oBAAoBI,KAAKI,EAAE;AAC1C,aAAOC,QAAQK;IACjB,GACA;MAACd;KAAoB;AAGvB,UAAMe,mBAAmBF,YACvB,CAACT,SAAAA;AACC,YAAMK,SAAST,oBAAoBI,KAAKI,EAAE;AAC1C,UAAIC,QAAQ;AACV,aAAKX,SAASkB,aAAaC,aAAaC,MAAM;UAAEC,MAAM;UAAQC,SAAS;YAACC,iBAAiBZ,MAAAA;;QAAS,CAAA,CAAA;MACpG;IACF,GACA;MAACT;MAAqBF;KAAS;AAGjC,WACE,sBAAA,cAACwB,OAAAA;MAAIC,MAAK;MAAOC,WAAWC,GAAGC,kBAAAA;OAC7B,sBAAA,cAACC,KAAKC,MAAI;MAAeC,OAAOvC;MAAWwC,QAAQC,OAAOC,GAAGtC,YAAAA;MAAeuC,OAAO,CAAC7B,SAASA,KAAKI;OAC/F,CAAC,EAAEqB,MAAK,MACP,sBAAA,cAACP,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACxBK,OAAO1B,IAAI,CAACC,SACX,sBAAA,cAACuB,KAAKO,MAAI;MACRC,KAAK/B,KAAKI;MACV4B,MAAMhC;MACNiC,YAAYZ,GAAGzC,MAAMsD,YAAY,gBAAgB,SAAS,eAAA;OAE1D,sBAAA,cAAChB,OAAAA;MAAIE,WAAU;OACb,sBAAA,cAACG,KAAKY,WAAS;MAACF,YAAW;OAAYjC,KAAKU,IAAI,GAC/CF,cAAcR,IAAAA,KACb,sBAAA,cAACkB,OAAAA;MAAIE,WAAU;OAAqCZ,cAAcR,IAAAA,CAAAA,CAAAA,GAGrEJ,oBAAoBI,KAAKI,EAAE,KAC1B,sBAAA,cAACgC,QAAAA;MAAOC,SAAS,MAAM1B,iBAAiBX,IAAAA;OAAQjB,EAAE,oCAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAQ7DG,UAAUoD,WAAW,KAAK,sBAAA,cAACpB,OAAAA;MAAIE,WAAU;OAAmCrC,EAAE,oBAAA,CAAA,CAAA;;;;AAGrF;;;ACvFA,IAAA,yBAAewD;",
6
+ "names": ["Schema", "React", "useCallback", "useMemo", "createIntent", "LayoutAction", "useIntentDispatcher", "FunctionType", "ScriptType", "Filter", "fullyQualifiedId", "useQuery", "Button", "useTranslation", "controlItemClasses", "List", "ghostHover", "mx", "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", "div", "role", "className", "mx", "controlItemClasses", "List", "Root", "items", "isItem", "Schema", "is", "getId", "Item", "key", "item", "classNames", "ghostHover", "ItemTitle", "Button", "onClick", "length", "FunctionsPanel"]
7
+ }
@@ -0,0 +1,40 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ AUTOMATION_PLUGIN
4
+ } from "./chunk-HCCLRNMJ.mjs";
5
+
6
+ // packages/plugins/plugin-automation/src/types.ts
7
+ import { Schema } from "effect";
8
+ import { SpaceSchema } from "@dxos/react-client/echo";
9
+ var TriggerTemplate = Schema.Union(Schema.Struct({
10
+ type: Schema.Literal("timer"),
11
+ cron: Schema.String
12
+ }), Schema.Struct({
13
+ type: Schema.Literal("queue"),
14
+ queueDXN: Schema.Any
15
+ }));
16
+ (function(AutomationAction2) {
17
+ const AUTOMATION_ACTION = `${AUTOMATION_PLUGIN}/action`;
18
+ class CreateTriggerFromTemplate extends Schema.TaggedClass()(`${AUTOMATION_ACTION}/create-trigger-from-template`, {
19
+ input: Schema.Struct({
20
+ space: SpaceSchema,
21
+ template: TriggerTemplate,
22
+ enabled: Schema.optional(Schema.Boolean),
23
+ // TODO(wittjosiah): Improve how this lookup is done.
24
+ scriptName: Schema.optional(Schema.String),
25
+ input: Schema.optional(Schema.Record({
26
+ key: Schema.String,
27
+ value: Schema.Any
28
+ }))
29
+ }),
30
+ output: Schema.Void
31
+ }) {
32
+ }
33
+ AutomationAction2.CreateTriggerFromTemplate = CreateTriggerFromTemplate;
34
+ })(AutomationAction || (AutomationAction = {}));
35
+ var AutomationAction;
36
+
37
+ export {
38
+ AutomationAction
39
+ };
40
+ //# sourceMappingURL=chunk-6JOJ2NN4.mjs.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,SAASA,cAAc;AAEvB,SAASC,mBAAmB;AAI5B,IAAMC,kBAAkBC,OAAOC,MAC7BD,OAAOE,OAAO;EAAEC,MAAMH,OAAOI,QAAQ,OAAA;EAAUC,MAAML,OAAOM;AAAO,CAAA,GACnEN,OAAOE,OAAO;EAAEC,MAAMH,OAAOI,QAAQ,OAAA;EAAUG,UAAUP,OAAOQ;AAAI,CAAA,CAAA;UAGrDC,mBAAAA;AACf,QAAMC,oBAAoB,GAAGC,iBAAAA;EAEtB,MAAMC,kCAAkCZ,OAAOa,YAAW,EAC/D,GAAGH,iBAAAA,iCACH;IACEI,OAAOd,OAAOE,OAAO;MACnBa,OAAOC;MACPC,UAAUlB;MACVmB,SAASlB,OAAOmB,SAASnB,OAAOoB,OAAO;;MAEvCC,YAAYrB,OAAOmB,SAASnB,OAAOM,MAAM;MACzCQ,OAAOd,OAAOmB,SAASnB,OAAOsB,OAAO;QAAEC,KAAKvB,OAAOM;QAAQkB,OAAOxB,OAAOQ;MAAI,CAAA,CAAA;IAC/E,CAAA;IACAiB,QAAQzB,OAAO0B;EACjB,CAAA,EAAA;EACC;oBAbUd,4BAAAA;AAcf,GAjBiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;;",
6
+ "names": ["Schema", "SpaceSchema", "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
+ }