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

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 (168) hide show
  1. package/dist/lib/browser/{chunk-2QF27UJ2.mjs → AutomationPanel-YAHFXQX6.mjs} +23 -24
  2. package/dist/lib/browser/AutomationPanel-YAHFXQX6.mjs.map +7 -0
  3. package/dist/lib/browser/app-graph-builder-K3BIQFWW.mjs +40 -0
  4. package/dist/lib/browser/app-graph-builder-K3BIQFWW.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-FALBBJNO.mjs +138 -0
  6. package/dist/lib/browser/chunk-FALBBJNO.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-MT3FZH4V.mjs +8 -0
  8. package/dist/lib/browser/chunk-MT3FZH4V.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +19 -25
  10. package/dist/lib/browser/index.mjs.map +3 -3
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/react-surface-4QQSJR4A.mjs +42 -0
  13. package/dist/lib/browser/react-surface-4QQSJR4A.mjs.map +7 -0
  14. package/dist/lib/node/{chunk-TI3WBQIB.cjs → AutomationPanel-ZKAMIU6O.cjs} +26 -31
  15. package/dist/lib/node/AutomationPanel-ZKAMIU6O.cjs.map +7 -0
  16. package/dist/lib/node/app-graph-builder-HO4FPGZ5.cjs +56 -0
  17. package/dist/lib/node/app-graph-builder-HO4FPGZ5.cjs.map +7 -0
  18. package/dist/lib/node/{chunk-SV2CB3FT.cjs → chunk-AGJ6XTDN.cjs} +7 -16
  19. package/dist/lib/node/chunk-AGJ6XTDN.cjs.map +7 -0
  20. package/dist/lib/node/chunk-FTEDH5Q6.cjs +167 -0
  21. package/dist/lib/node/chunk-FTEDH5Q6.cjs.map +7 -0
  22. package/dist/lib/node/index.cjs +22 -28
  23. package/dist/lib/node/index.cjs.map +3 -3
  24. package/dist/lib/node/meta.json +1 -1
  25. package/dist/lib/node/{react-surface-43VHU36V.cjs → react-surface-52M54VWV.cjs} +15 -39
  26. package/dist/lib/node/react-surface-52M54VWV.cjs.map +7 -0
  27. package/dist/lib/node-esm/{chunk-DIUPZXCQ.mjs → AutomationPanel-XF7YPSKM.mjs} +23 -24
  28. package/dist/lib/node-esm/AutomationPanel-XF7YPSKM.mjs.map +7 -0
  29. package/dist/lib/node-esm/app-graph-builder-XCJR33VS.mjs +41 -0
  30. package/dist/lib/node-esm/app-graph-builder-XCJR33VS.mjs.map +7 -0
  31. package/dist/lib/node-esm/chunk-M4QXMIIB.mjs +139 -0
  32. package/dist/lib/node-esm/chunk-M4QXMIIB.mjs.map +7 -0
  33. package/dist/lib/node-esm/chunk-OA75PSGH.mjs +10 -0
  34. package/dist/lib/node-esm/chunk-OA75PSGH.mjs.map +7 -0
  35. package/dist/lib/node-esm/index.mjs +19 -25
  36. package/dist/lib/node-esm/index.mjs.map +3 -3
  37. package/dist/lib/node-esm/meta.json +1 -1
  38. package/dist/lib/node-esm/react-surface-MGKM3OO3.mjs +43 -0
  39. package/dist/lib/node-esm/react-surface-MGKM3OO3.mjs.map +7 -0
  40. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  41. package/dist/types/src/capabilities/app-graph-builder.d.ts +179 -2
  42. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  43. package/dist/types/src/capabilities/index.d.ts +177 -2
  44. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  45. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  46. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +3 -6
  47. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  48. package/dist/types/src/components/AutomationPanel/index.d.ts +0 -1
  49. package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -1
  50. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -1
  51. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  52. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  53. package/dist/types/src/components/index.d.ts +1 -8
  54. package/dist/types/src/components/index.d.ts.map +1 -1
  55. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  56. package/dist/types/src/translations.d.ts +0 -8
  57. package/dist/types/src/translations.d.ts.map +1 -1
  58. package/dist/types/tsconfig.tsbuildinfo +1 -1
  59. package/package.json +24 -36
  60. package/src/AutomationPlugin.tsx +10 -5
  61. package/src/capabilities/app-graph-builder.ts +17 -71
  62. package/src/capabilities/index.ts +0 -1
  63. package/src/capabilities/react-surface.tsx +8 -32
  64. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +5 -5
  65. package/src/components/AutomationPanel/AutomationPanel.tsx +72 -72
  66. package/src/components/AutomationPanel/index.ts +0 -2
  67. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +10 -19
  68. package/src/components/TriggerEditor/TriggerEditor.tsx +93 -53
  69. package/src/components/index.ts +0 -3
  70. package/src/testing/test-functions.ts +9 -23
  71. package/src/translations.ts +1 -10
  72. package/dist/lib/browser/AutomationContainer-DA6IW7O2.mjs +0 -34
  73. package/dist/lib/browser/AutomationContainer-DA6IW7O2.mjs.map +0 -7
  74. package/dist/lib/browser/AutomationPanel-R42D3LDD.mjs +0 -11
  75. package/dist/lib/browser/AutomationPanel-R42D3LDD.mjs.map +0 -7
  76. package/dist/lib/browser/FunctionsContainer-MPBMMOMS.mjs +0 -33
  77. package/dist/lib/browser/FunctionsContainer-MPBMMOMS.mjs.map +0 -7
  78. package/dist/lib/browser/FunctionsPanel-NSI3P53X.mjs +0 -10
  79. package/dist/lib/browser/FunctionsPanel-NSI3P53X.mjs.map +0 -7
  80. package/dist/lib/browser/app-graph-builder-2OGPEVBA.mjs +0 -79
  81. package/dist/lib/browser/app-graph-builder-2OGPEVBA.mjs.map +0 -7
  82. package/dist/lib/browser/chunk-2QF27UJ2.mjs.map +0 -7
  83. package/dist/lib/browser/chunk-ADYCSC6Y.mjs +0 -39
  84. package/dist/lib/browser/chunk-ADYCSC6Y.mjs.map +0 -7
  85. package/dist/lib/browser/chunk-BNQNURZN.mjs +0 -211
  86. package/dist/lib/browser/chunk-BNQNURZN.mjs.map +0 -7
  87. package/dist/lib/browser/chunk-SGT76SL2.mjs +0 -14
  88. package/dist/lib/browser/chunk-SGT76SL2.mjs.map +0 -7
  89. package/dist/lib/browser/chunk-TRC3J2I6.mjs +0 -88
  90. package/dist/lib/browser/chunk-TRC3J2I6.mjs.map +0 -7
  91. package/dist/lib/browser/intent-resolver-X3H6ZSP4.mjs +0 -77
  92. package/dist/lib/browser/intent-resolver-X3H6ZSP4.mjs.map +0 -7
  93. package/dist/lib/browser/react-surface-MOXIHBMS.mjs +0 -68
  94. package/dist/lib/browser/react-surface-MOXIHBMS.mjs.map +0 -7
  95. package/dist/lib/browser/types.mjs +0 -8
  96. package/dist/lib/browser/types.mjs.map +0 -7
  97. package/dist/lib/node/AutomationContainer-FIFH4P5T.cjs +0 -62
  98. package/dist/lib/node/AutomationContainer-FIFH4P5T.cjs.map +0 -7
  99. package/dist/lib/node/AutomationPanel-HTNEWBGB.cjs +0 -32
  100. package/dist/lib/node/AutomationPanel-HTNEWBGB.cjs.map +0 -7
  101. package/dist/lib/node/FunctionsContainer-LF2F6CPE.cjs +0 -61
  102. package/dist/lib/node/FunctionsContainer-LF2F6CPE.cjs.map +0 -7
  103. package/dist/lib/node/FunctionsPanel-6HOAIMQ3.cjs +0 -31
  104. package/dist/lib/node/FunctionsPanel-6HOAIMQ3.cjs.map +0 -7
  105. package/dist/lib/node/app-graph-builder-3XGDVWHR.cjs +0 -95
  106. package/dist/lib/node/app-graph-builder-3XGDVWHR.cjs.map +0 -7
  107. package/dist/lib/node/chunk-CBHWMYKF.cjs +0 -116
  108. package/dist/lib/node/chunk-CBHWMYKF.cjs.map +0 -7
  109. package/dist/lib/node/chunk-GDCG2BML.cjs +0 -58
  110. package/dist/lib/node/chunk-GDCG2BML.cjs.map +0 -7
  111. package/dist/lib/node/chunk-S3Z4AP77.cjs +0 -234
  112. package/dist/lib/node/chunk-S3Z4AP77.cjs.map +0 -7
  113. package/dist/lib/node/chunk-SV2CB3FT.cjs.map +0 -7
  114. package/dist/lib/node/chunk-TI3WBQIB.cjs.map +0 -7
  115. package/dist/lib/node/intent-resolver-Q7WJ4PZZ.cjs +0 -93
  116. package/dist/lib/node/intent-resolver-Q7WJ4PZZ.cjs.map +0 -7
  117. package/dist/lib/node/react-surface-43VHU36V.cjs.map +0 -7
  118. package/dist/lib/node/types.cjs +0 -30
  119. package/dist/lib/node/types.cjs.map +0 -7
  120. package/dist/lib/node-esm/AutomationContainer-OP43F4PD.mjs +0 -35
  121. package/dist/lib/node-esm/AutomationContainer-OP43F4PD.mjs.map +0 -7
  122. package/dist/lib/node-esm/AutomationPanel-ZQKRBWP2.mjs +0 -12
  123. package/dist/lib/node-esm/AutomationPanel-ZQKRBWP2.mjs.map +0 -7
  124. package/dist/lib/node-esm/FunctionsContainer-5TVRDIX5.mjs +0 -34
  125. package/dist/lib/node-esm/FunctionsContainer-5TVRDIX5.mjs.map +0 -7
  126. package/dist/lib/node-esm/FunctionsPanel-NMEW26KL.mjs +0 -11
  127. package/dist/lib/node-esm/FunctionsPanel-NMEW26KL.mjs.map +0 -7
  128. package/dist/lib/node-esm/app-graph-builder-UR2E5CQY.mjs +0 -80
  129. package/dist/lib/node-esm/app-graph-builder-UR2E5CQY.mjs.map +0 -7
  130. package/dist/lib/node-esm/chunk-AD4C4IK2.mjs +0 -89
  131. package/dist/lib/node-esm/chunk-AD4C4IK2.mjs.map +0 -7
  132. package/dist/lib/node-esm/chunk-CUPEMOYK.mjs +0 -16
  133. package/dist/lib/node-esm/chunk-CUPEMOYK.mjs.map +0 -7
  134. package/dist/lib/node-esm/chunk-DIUPZXCQ.mjs.map +0 -7
  135. package/dist/lib/node-esm/chunk-DZ7RKC52.mjs +0 -212
  136. package/dist/lib/node-esm/chunk-DZ7RKC52.mjs.map +0 -7
  137. package/dist/lib/node-esm/chunk-EEA6CZ6B.mjs +0 -40
  138. package/dist/lib/node-esm/chunk-EEA6CZ6B.mjs.map +0 -7
  139. package/dist/lib/node-esm/intent-resolver-HEUGQ6SL.mjs +0 -78
  140. package/dist/lib/node-esm/intent-resolver-HEUGQ6SL.mjs.map +0 -7
  141. package/dist/lib/node-esm/react-surface-TER7JEF6.mjs +0 -69
  142. package/dist/lib/node-esm/react-surface-TER7JEF6.mjs.map +0 -7
  143. package/dist/lib/node-esm/types.mjs +0 -9
  144. package/dist/lib/node-esm/types.mjs.map +0 -7
  145. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  146. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  147. package/dist/types/src/components/AutomationContainer.d.ts +0 -7
  148. package/dist/types/src/components/AutomationContainer.d.ts.map +0 -1
  149. package/dist/types/src/components/FunctionsContainer.d.ts +0 -7
  150. package/dist/types/src/components/FunctionsContainer.d.ts.map +0 -1
  151. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts +0 -7
  152. package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +0 -1
  153. package/dist/types/src/components/FunctionsPanel/index.d.ts +0 -4
  154. package/dist/types/src/components/FunctionsPanel/index.d.ts.map +0 -1
  155. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +0 -12
  156. package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +0 -1
  157. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +0 -5
  158. package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +0 -1
  159. package/dist/types/src/types.d.ts +0 -25
  160. package/dist/types/src/types.d.ts.map +0 -1
  161. package/src/capabilities/intent-resolver.ts +0 -73
  162. package/src/components/AutomationContainer.tsx +0 -31
  163. package/src/components/FunctionsContainer.tsx +0 -31
  164. package/src/components/FunctionsPanel/FunctionsPanel.tsx +0 -95
  165. package/src/components/FunctionsPanel/index.ts +0 -8
  166. package/src/components/TriggerEditor/FunctionInputEditor.tsx +0 -77
  167. package/src/components/TriggerEditor/SpecSelector.tsx +0 -59
  168. package/src/types.ts +0 -33
@@ -1,62 +0,0 @@
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 AutomationContainer_FIFH4P5T_exports = {};
30
- __export(AutomationContainer_FIFH4P5T_exports, {
31
- AutomationContainer: () => AutomationContainer,
32
- default: () => AutomationContainer_default
33
- });
34
- module.exports = __toCommonJS(AutomationContainer_FIFH4P5T_exports);
35
- var import_chunk_TI3WBQIB = require("./chunk-TI3WBQIB.cjs");
36
- var import_chunk_S3Z4AP77 = require("./chunk-S3Z4AP77.cjs");
37
- var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
38
- var import_react = __toESM(require("react"));
39
- var import_react_ui = require("@dxos/react-ui");
40
- var import_react_ui_form = require("@dxos/react-ui-form");
41
- var import_react_ui_stack = require("@dxos/react-ui-stack");
42
- var AutomationContainer = ({ space }) => {
43
- const { t } = (0, import_react_ui.useTranslation)(import_chunk_7GXNXMSM.AUTOMATION_PLUGIN);
44
- return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.StackItem.Content, {
45
- classNames: "block overflow-y-auto"
46
- }, /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.ControlPage, null, /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.ControlSection, {
47
- title: t("automation verbose label", {
48
- ns: import_chunk_7GXNXMSM.AUTOMATION_PLUGIN
49
- }),
50
- description: t("automation description", {
51
- ns: import_chunk_7GXNXMSM.AUTOMATION_PLUGIN
52
- })
53
- }, /* @__PURE__ */ import_react.default.createElement(import_chunk_TI3WBQIB.AutomationPanel, {
54
- space
55
- }))));
56
- };
57
- var AutomationContainer_default = AutomationContainer;
58
- // Annotate the CommonJS export names for ESM import in node:
59
- 0 && (module.exports = {
60
- AutomationContainer
61
- });
62
- //# sourceMappingURL=AutomationContainer-FIFH4P5T.cjs.map
@@ -1,7 +0,0 @@
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,mBAAkB;AAGlB,sBAA+B;AAC/B,2BAA4C;AAC5C,4BAA0B;AAKnB,IAAMA,sBAAsB,CAAC,EAAEC,MAAK,MAAoB;AAC7D,QAAM,EAAEC,EAAC,QAAKC,gCAAeC,uCAAAA;AAC7B,SACE,6BAAAC,QAAA,cAACC,gCAAUC,SAAO;IAACC,YAAW;KAC5B,6BAAAH,QAAA,cAACI,kCAAAA,MACC,6BAAAJ,QAAA,cAACK,qCAAAA;IACCC,OAAOT,EAAE,4BAA4B;MAAEU,IAAIR;IAAkB,CAAA;IAC7DS,aAAaX,EAAE,0BAA0B;MAAEU,IAAIR;IAAkB,CAAA;KAEjE,6BAAAC,QAAA,cAACS,uCAAAA;IAAgBb;;AAK3B;AAEA,IAAA,8BAAeD;",
6
- "names": ["AutomationContainer", "space", "t", "useTranslation", "AUTOMATION_PLUGIN", "React", "StackItem", "Content", "classNames", "ControlPage", "ControlSection", "title", "ns", "description", "AutomationPanel"]
7
- }
@@ -1,32 +0,0 @@
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 AutomationPanel_HTNEWBGB_exports = {};
20
- __export(AutomationPanel_HTNEWBGB_exports, {
21
- AutomationPanel: () => import_chunk_TI3WBQIB.AutomationPanel,
22
- default: () => import_chunk_TI3WBQIB.AutomationPanel_default
23
- });
24
- module.exports = __toCommonJS(AutomationPanel_HTNEWBGB_exports);
25
- var import_chunk_TI3WBQIB = require("./chunk-TI3WBQIB.cjs");
26
- var import_chunk_S3Z4AP77 = require("./chunk-S3Z4AP77.cjs");
27
- var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
28
- // Annotate the CommonJS export names for ESM import in node:
29
- 0 && (module.exports = {
30
- AutomationPanel
31
- });
32
- //# sourceMappingURL=AutomationPanel-HTNEWBGB.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["AutomationPanel-HTNEWBGB.cjs"],
4
- "sourcesContent": ["import {\n AutomationPanel,\n AutomationPanel_default\n} from \"./chunk-TI3WBQIB.cjs\";\nimport \"./chunk-S3Z4AP77.cjs\";\nimport \"./chunk-7GXNXMSM.cjs\";\nexport {\n AutomationPanel,\n AutomationPanel_default as default\n};\n//# sourceMappingURL=AutomationPanel-HTNEWBGB.cjs.map\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAGO;AACP,4BAAO;AACP,4BAAO;",
6
- "names": []
7
- }
@@ -1,61 +0,0 @@
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 FunctionsContainer_LF2F6CPE_exports = {};
30
- __export(FunctionsContainer_LF2F6CPE_exports, {
31
- FunctionsContainer: () => FunctionsContainer,
32
- default: () => FunctionsContainer_default
33
- });
34
- module.exports = __toCommonJS(FunctionsContainer_LF2F6CPE_exports);
35
- var import_chunk_CBHWMYKF = require("./chunk-CBHWMYKF.cjs");
36
- var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
37
- var import_react = __toESM(require("react"));
38
- var import_react_ui = require("@dxos/react-ui");
39
- var import_react_ui_form = require("@dxos/react-ui-form");
40
- var import_react_ui_stack = require("@dxos/react-ui-stack");
41
- var FunctionsContainer = ({ space }) => {
42
- const { t } = (0, import_react_ui.useTranslation)(import_chunk_7GXNXMSM.AUTOMATION_PLUGIN);
43
- return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.StackItem.Content, {
44
- classNames: "block overflow-y-auto"
45
- }, /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.ControlPage, null, /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.ControlSection, {
46
- title: t("functions verbose label", {
47
- ns: import_chunk_7GXNXMSM.AUTOMATION_PLUGIN
48
- }),
49
- description: t("functions description", {
50
- ns: import_chunk_7GXNXMSM.AUTOMATION_PLUGIN
51
- })
52
- }, /* @__PURE__ */ import_react.default.createElement(import_chunk_CBHWMYKF.FunctionsPanel, {
53
- space
54
- }))));
55
- };
56
- var FunctionsContainer_default = FunctionsContainer;
57
- // Annotate the CommonJS export names for ESM import in node:
58
- 0 && (module.exports = {
59
- FunctionsContainer
60
- });
61
- //# sourceMappingURL=FunctionsContainer-LF2F6CPE.cjs.map
@@ -1,7 +0,0 @@
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,mBAAkB;AAGlB,sBAA+B;AAC/B,2BAA4C;AAC5C,4BAA0B;AAKnB,IAAMA,qBAAqB,CAAC,EAAEC,MAAK,MAAoB;AAC5D,QAAM,EAAEC,EAAC,QAAKC,gCAAeC,uCAAAA;AAC7B,SACE,6BAAAC,QAAA,cAACC,gCAAUC,SAAO;IAACC,YAAW;KAC5B,6BAAAH,QAAA,cAACI,kCAAAA,MACC,6BAAAJ,QAAA,cAACK,qCAAAA;IACCC,OAAOT,EAAE,2BAA2B;MAAEU,IAAIR;IAAkB,CAAA;IAC5DS,aAAaX,EAAE,yBAAyB;MAAEU,IAAIR;IAAkB,CAAA;KAEhE,6BAAAC,QAAA,cAACS,sCAAAA;IAAeb;;AAK1B;AAEA,IAAA,6BAAeD;",
6
- "names": ["FunctionsContainer", "space", "t", "useTranslation", "AUTOMATION_PLUGIN", "React", "StackItem", "Content", "classNames", "ControlPage", "ControlSection", "title", "ns", "description", "FunctionsPanel"]
7
- }
@@ -1,31 +0,0 @@
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 FunctionsPanel_6HOAIMQ3_exports = {};
20
- __export(FunctionsPanel_6HOAIMQ3_exports, {
21
- FunctionsPanel: () => import_chunk_CBHWMYKF.FunctionsPanel,
22
- default: () => import_chunk_CBHWMYKF.FunctionsPanel_default
23
- });
24
- module.exports = __toCommonJS(FunctionsPanel_6HOAIMQ3_exports);
25
- var import_chunk_CBHWMYKF = require("./chunk-CBHWMYKF.cjs");
26
- var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
27
- // Annotate the CommonJS export names for ESM import in node:
28
- 0 && (module.exports = {
29
- FunctionsPanel
30
- });
31
- //# sourceMappingURL=FunctionsPanel-6HOAIMQ3.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["FunctionsPanel-6HOAIMQ3.cjs"],
4
- "sourcesContent": ["import {\n FunctionsPanel,\n FunctionsPanel_default\n} from \"./chunk-CBHWMYKF.cjs\";\nimport \"./chunk-7GXNXMSM.cjs\";\nexport {\n FunctionsPanel,\n FunctionsPanel_default as default\n};\n//# sourceMappingURL=FunctionsPanel-6HOAIMQ3.cjs.map\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAGO;AACP,4BAAO;",
6
- "names": []
7
- }
@@ -1,95 +0,0 @@
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 app_graph_builder_3XGDVWHR_exports = {};
20
- __export(app_graph_builder_3XGDVWHR_exports, {
21
- default: () => app_graph_builder_default
22
- });
23
- module.exports = __toCommonJS(app_graph_builder_3XGDVWHR_exports);
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");
27
- var import_app_framework = require("@dxos/app-framework");
28
- var import_echo_schema = require("@dxos/echo-schema");
29
- var import_functions = require("@dxos/functions");
30
- var import_types = require("@dxos/plugin-deck/types");
31
- var import_plugin_graph = require("@dxos/plugin-graph");
32
- var import_plugin_space = require("@dxos/plugin-space");
33
- var app_graph_builder_default = (context) => (0, import_app_framework.contributes)(import_app_framework.Capabilities.AppGraphBuilder, [
34
- (0, import_plugin_graph.createExtension)({
35
- id: `${import_chunk_7GXNXMSM.meta.id}/space-settings-automation`,
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
- {
38
- id: `automation-${node2.id}`,
39
- type: `${import_chunk_7GXNXMSM.meta.id}/space-settings-automation`,
40
- data: `${import_chunk_7GXNXMSM.meta.id}/space-settings-automation`,
41
- properties: {
42
- label: [
43
- "automation panel label",
44
- {
45
- ns: import_chunk_7GXNXMSM.meta.id
46
- }
47
- ],
48
- icon: "ph--lightning--regular"
49
- }
50
- }
51
- ]), import_effect.Option.getOrElse(() => [])))
52
- }),
53
- (0, import_plugin_graph.createExtension)({
54
- id: `${import_chunk_7GXNXMSM.meta.id}/space-settings-functions`,
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) => [
56
- {
57
- id: `functions-${node2.id}`,
58
- type: `${import_chunk_7GXNXMSM.meta.id}/space-settings-functions`,
59
- data: `${import_chunk_7GXNXMSM.meta.id}/space-settings-functions`,
60
- properties: {
61
- label: [
62
- "functions panel label",
63
- {
64
- ns: import_chunk_7GXNXMSM.meta.id
65
- }
66
- ],
67
- icon: "ph--function--regular"
68
- }
69
- }
70
- ]), import_effect.Option.getOrElse(() => [])))
71
- }),
72
- (0, import_plugin_graph.createExtension)({
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) => [
75
- {
76
- id: [
77
- node2.id,
78
- "automation"
79
- ].join(import_types.ATTENDABLE_PATH_SEPARATOR),
80
- type: import_types.PLANK_COMPANION_TYPE,
81
- data: "automation",
82
- properties: {
83
- label: [
84
- "script automation label",
85
- {
86
- ns: import_chunk_7GXNXMSM.meta.id
87
- }
88
- ],
89
- icon: "ph--lightning--regular"
90
- }
91
- }
92
- ]), import_effect.Option.getOrElse(() => [])))
93
- })
94
- ]);
95
- //# sourceMappingURL=app-graph-builder-3XGDVWHR.cjs.map
@@ -1,7 +0,0 @@
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,oBACED,IAAIH,IAAAA,GACJK,qBAAOC,QAAQ,CAACN,UAAUA,MAAKO,SAAS,GAAGC,gCAAAA,cAA0BH,qBAAOI,KAAKT,KAAAA,IAAQK,qBAAOK,KAAI,CAAA,GACpGL,qBAAOM,IAAI,CAACX,UAAS;MACnB;QACEH,IAAI,cAAcG,MAAKH,EAAE;QACzBU,MAAM,GAAGT,2BAAKD,EAAE;QAChBe,MAAM,GAAGd,2BAAKD,EAAE;QAChBgB,YAAY;UACVC,OAAO;YAAC;YAA0B;cAAEC,IAAIjB,2BAAKD;YAAG;;UAChDmB,MAAM;QACR;MACF;KACD,GACDX,qBAAOY,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;MACArB,qCAAgB;IACdC,IAAI,GAAGC,2BAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,mBAAGC,KAAK,CAACC,YACPC,oBACED,IAAIH,IAAAA,GACJK,qBAAOC,QAAQ,CAACN,UAAUA,MAAKO,SAAS,GAAGC,gCAAAA,cAA0BH,qBAAOI,KAAKT,KAAAA,IAAQK,qBAAOK,KAAI,CAAA,GACpGL,qBAAOM,IAAI,CAACX,UAAS;MACnB;QACEH,IAAI,aAAaG,MAAKH,EAAE;QACxBU,MAAM,GAAGT,2BAAKD,EAAE;QAChBe,MAAM,GAAGd,2BAAKD,EAAE;QAChBgB,YAAY;UACVC,OAAO;YAAC;YAAyB;cAAEC,IAAIjB,2BAAKD;YAAG;;UAC/CmB,MAAM;QACR;MACF;KACD,GACDX,qBAAOY,UAAU,MAAM,CAAA,CAAE,CAAA,CAAA;EAGjC,CAAA;MACArB,qCAAgB;IACdC,IAAI,GAAGC,2BAAKD,EAAE;IACdE,WAAW,CAACC,SACVC,mBAAGC,KAAK,CAACC,YACPC,oBACED,IAAIH,IAAAA,GACJK,qBAAOC,QAAQ,CAACN,cAAUkB,iCAAaC,6BAAYnB,MAAKY,IAAI,IAAIP,qBAAOI,KAAKT,KAAAA,IAAQK,qBAAOK,KAAI,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
- }
@@ -1,116 +0,0 @@
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_CBHWMYKF_exports = {};
30
- __export(chunk_CBHWMYKF_exports, {
31
- FunctionsPanel: () => FunctionsPanel,
32
- FunctionsPanel_default: () => FunctionsPanel_default
33
- });
34
- module.exports = __toCommonJS(chunk_CBHWMYKF_exports);
35
- var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
36
- var import_effect = require("effect");
37
- var import_react = __toESM(require("react"));
38
- var import_app_framework = require("@dxos/app-framework");
39
- var import_functions = require("@dxos/functions");
40
- var import_echo = require("@dxos/react-client/echo");
41
- var import_react_ui = require("@dxos/react-ui");
42
- var import_react_ui_form = require("@dxos/react-ui-form");
43
- var import_react_ui_list = require("@dxos/react-ui-list");
44
- var import_react_ui_theme = require("@dxos/react-ui-theme");
45
- var grid = "grid grid-cols-[1fr_auto] min-bs-[2.5rem]";
46
- var FunctionsPanel = ({ space }) => {
47
- const { t } = (0, import_react_ui.useTranslation)(import_chunk_7GXNXMSM.AUTOMATION_PLUGIN);
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
- const { dispatchPromise: dispatch } = (0, import_app_framework.useIntentDispatcher)();
51
- const functionToScriptMap = (0, import_react.useMemo)(() => functions.reduce((map, func) => {
52
- const scriptId = func.source?.target?.id;
53
- if (scriptId) {
54
- const script = scripts.find((s) => s.id === scriptId);
55
- if (script) {
56
- map[func.id] = script;
57
- }
58
- }
59
- return map;
60
- }, {}), [
61
- functions,
62
- scripts
63
- ]);
64
- const getScriptName = (0, import_react.useCallback)((func) => {
65
- const script = functionToScriptMap[func.id];
66
- return script?.name;
67
- }, [
68
- functionToScriptMap
69
- ]);
70
- const handleGoToScript = (0, import_react.useCallback)((func) => {
71
- const script = functionToScriptMap[func.id];
72
- if (script) {
73
- void dispatch((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.Open, {
74
- part: "main",
75
- subject: [
76
- (0, import_echo.fullyQualifiedId)(script)
77
- ]
78
- }));
79
- }
80
- }, [
81
- functionToScriptMap,
82
- dispatch
83
- ]);
84
- return /* @__PURE__ */ import_react.default.createElement("div", {
85
- role: "none",
86
- className: (0, import_react_ui_theme.mx)(import_react_ui_form.controlItemClasses)
87
- }, /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.Root, {
88
- items: functions,
89
- isItem: import_effect.Schema.is(import_functions.FunctionType),
90
- getId: (func) => func.id
91
- }, ({ items }) => /* @__PURE__ */ import_react.default.createElement("div", {
92
- role: "list",
93
- className: "flex flex-col w-full"
94
- }, items?.map((func) => /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.Item, {
95
- key: func.id,
96
- item: func,
97
- classNames: (0, import_react_ui_theme.mx)(grid, import_react_ui_theme.ghostHover, "items-center", "pli-2", "min-bs-[3rem]")
98
- }, /* @__PURE__ */ import_react.default.createElement("div", {
99
- className: "flex flex-col truncate"
100
- }, /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.ItemTitle, {
101
- classNames: "truncate"
102
- }, func.name), getScriptName(func) && /* @__PURE__ */ import_react.default.createElement("div", {
103
- className: "text-xs text-description truncate"
104
- }, getScriptName(func))), functionToScriptMap[func.id] && /* @__PURE__ */ import_react.default.createElement(import_react_ui.Button, {
105
- onClick: () => handleGoToScript(func)
106
- }, t("go to function source button label")))))), functions.length === 0 && /* @__PURE__ */ import_react.default.createElement("div", {
107
- className: "text-center plb-4 text-gray-500"
108
- }, t("no functions found")));
109
- };
110
- var FunctionsPanel_default = FunctionsPanel;
111
- // Annotate the CommonJS export names for ESM import in node:
112
- 0 && (module.exports = {
113
- FunctionsPanel,
114
- FunctionsPanel_default
115
- });
116
- //# sourceMappingURL=chunk-CBHWMYKF.cjs.map
@@ -1,7 +0,0 @@
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;IAACb;IAAWK;GAAQ;AAGtB,QAAMiB,oBAAgBC,0BACpB,CAACT,SAAAA;AACC,UAAMK,SAAST,oBAAoBI,KAAKI,EAAE;AAC1C,WAAOC,QAAQK;EACjB,GACA;IAACd;GAAoB;AAGvB,QAAMe,uBAAmBF,0BACvB,CAACT,SAAAA;AACC,UAAMK,SAAST,oBAAoBI,KAAKI,EAAE;AAC1C,QAAIC,QAAQ;AACV,WAAKX,aAASkB,mCAAaC,kCAAaC,MAAM;QAAEC,MAAM;QAAQC,SAAS;cAACC,8BAAiBZ,MAAAA;;MAAS,CAAA,CAAA;IACpG;EACF,GACA;IAACT;IAAqBF;GAAS;AAGjC,SACE,6BAAAwB,QAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,eAAWC,0BAAGC,uCAAAA;KAC7B,6BAAAL,QAAA,cAACM,0BAAKC,MAAI;IAAeC,OAAOxC;IAAWyC,QAAQC,qBAAOC,GAAGvC,6BAAAA;IAAewC,OAAO,CAAC9B,SAASA,KAAKI;KAC/F,CAAC,EAAEsB,MAAK,MACP,6BAAAR,QAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACxBK,OAAO3B,IAAI,CAACC,SACX,6BAAAkB,QAAA,cAACM,0BAAKO,MAAI;IACRC,KAAKhC,KAAKI;IACV6B,MAAMjC;IACNkC,gBAAYZ,0BAAG1C,MAAMuD,kCAAY,gBAAgB,SAAS,eAAA;KAE1D,6BAAAjB,QAAA,cAACC,OAAAA;IAAIE,WAAU;KACb,6BAAAH,QAAA,cAACM,0BAAKY,WAAS;IAACF,YAAW;KAAYlC,KAAKU,IAAI,GAC/CF,cAAcR,IAAAA,KACb,6BAAAkB,QAAA,cAACC,OAAAA;IAAIE,WAAU;KAAqCb,cAAcR,IAAAA,CAAAA,CAAAA,GAGrEJ,oBAAoBI,KAAKI,EAAE,KAC1B,6BAAAc,QAAA,cAACmB,wBAAAA;IAAOC,SAAS,MAAM3B,iBAAiBX,IAAAA;KAAQjB,EAAE,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
- }
@@ -1,58 +0,0 @@
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 chunk_GDCG2BML_exports = {};
20
- __export(chunk_GDCG2BML_exports, {
21
- AutomationAction: () => AutomationAction
22
- });
23
- module.exports = __toCommonJS(chunk_GDCG2BML_exports);
24
- var import_chunk_7GXNXMSM = require("./chunk-7GXNXMSM.cjs");
25
- var import_effect = require("effect");
26
- var import_echo = require("@dxos/react-client/echo");
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
- }));
34
- var AutomationAction;
35
- (function(AutomationAction2) {
36
- const AUTOMATION_ACTION = `${import_chunk_7GXNXMSM.AUTOMATION_PLUGIN}/action`;
37
- class CreateTriggerFromTemplate extends import_effect.Schema.TaggedClass()(`${AUTOMATION_ACTION}/create-trigger-from-template`, {
38
- input: import_effect.Schema.Struct({
39
- space: import_echo.SpaceSchema,
40
- template: TriggerTemplate,
41
- enabled: import_effect.Schema.optional(import_effect.Schema.Boolean),
42
- // TODO(wittjosiah): Improve how this lookup is done.
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
- }))
48
- }),
49
- output: import_effect.Schema.Void
50
- }) {
51
- }
52
- AutomationAction2.CreateTriggerFromTemplate = CreateTriggerFromTemplate;
53
- })(AutomationAction || (AutomationAction = {}));
54
- // Annotate the CommonJS export names for ESM import in node:
55
- 0 && (module.exports = {
56
- AutomationAction
57
- });
58
- //# sourceMappingURL=chunk-GDCG2BML.cjs.map
@@ -1,7 +0,0 @@
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
- }