@dxos/plugin-automation 0.8.3 → 0.8.4-main.1f223c7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{AutomationContainer-OGNK3HD5.mjs → AutomationContainer-BRV5AJZ3.mjs} +8 -11
- package/dist/lib/browser/AutomationContainer-BRV5AJZ3.mjs.map +7 -0
- package/dist/lib/browser/AutomationPanel-N5HFJJXW.mjs +11 -0
- package/dist/lib/browser/{FunctionsContainer-JY7V7PLF.mjs → FunctionsContainer-U4HASI4P.mjs} +6 -9
- package/dist/lib/browser/FunctionsContainer-U4HASI4P.mjs.map +7 -0
- package/dist/lib/browser/{FunctionsPanel-LY4IFKR7.mjs → FunctionsPanel-I443Y6KB.mjs} +3 -3
- package/dist/lib/browser/{app-graph-builder-T34RV5UA.mjs → app-graph-builder-4OFKIRAI.mjs} +4 -4
- package/dist/lib/{node-esm/app-graph-builder-DYWAKQM3.mjs.map → browser/app-graph-builder-4OFKIRAI.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-C5VOC5EE.mjs → chunk-4TWQV33E.mjs} +14 -18
- package/dist/lib/browser/chunk-4TWQV33E.mjs.map +7 -0
- package/dist/lib/browser/chunk-EIY2EUWC.mjs +14 -0
- package/dist/lib/browser/{chunk-IHAKPP5A.mjs → chunk-GW5U2DGT.mjs} +2 -2
- package/dist/lib/browser/{chunk-4E2KPMLB.mjs → chunk-HN7OHFCB.mjs} +5 -6
- package/dist/lib/browser/chunk-HN7OHFCB.mjs.map +7 -0
- package/dist/lib/browser/{chunk-N5VLW7UZ.mjs → chunk-S4SM663I.mjs} +20 -20
- package/dist/lib/browser/chunk-S4SM663I.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RHSCK7AU.mjs → chunk-Z5DT4MHW.mjs} +5 -5
- package/dist/lib/{node-esm/chunk-2IH4VB3R.mjs.map → browser/chunk-Z5DT4MHW.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +15 -15
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-AX46HSU7.mjs → intent-resolver-4PSYSQQG.mjs} +10 -9
- package/dist/lib/browser/intent-resolver-4PSYSQQG.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-Z7A272CA.mjs → react-surface-M52XGLXY.mjs} +5 -5
- package/dist/lib/browser/types/index.mjs +8 -0
- package/dist/lib/node-esm/{AutomationContainer-ANCUYDDA.mjs → AutomationContainer-FYRDTERM.mjs} +8 -11
- package/dist/lib/node-esm/AutomationContainer-FYRDTERM.mjs.map +7 -0
- package/dist/lib/node-esm/{AutomationPanel-Y3ODAHH7.mjs → AutomationPanel-MKOLA2FE.mjs} +4 -4
- package/dist/lib/node-esm/{FunctionsContainer-25M5VT3J.mjs → FunctionsContainer-VZIVURH6.mjs} +6 -9
- package/dist/lib/node-esm/FunctionsContainer-VZIVURH6.mjs.map +7 -0
- package/dist/lib/node-esm/{FunctionsPanel-HVGF5AJP.mjs → FunctionsPanel-ELINCXPW.mjs} +3 -3
- package/dist/lib/node-esm/{app-graph-builder-DYWAKQM3.mjs → app-graph-builder-555IHYOB.mjs} +4 -4
- package/dist/lib/{browser/app-graph-builder-T34RV5UA.mjs.map → node-esm/app-graph-builder-555IHYOB.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-2T2OZC3A.mjs → chunk-AONUBWBE.mjs} +14 -18
- package/dist/lib/node-esm/chunk-AONUBWBE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WJHKFPX2.mjs → chunk-CICQ73ZT.mjs} +6 -6
- package/dist/lib/node-esm/{chunk-2IH4VB3R.mjs → chunk-CX2AILIS.mjs} +5 -5
- package/dist/lib/{browser/chunk-RHSCK7AU.mjs.map → node-esm/chunk-CX2AILIS.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-HCCLRNMJ.mjs → chunk-NK5N3QKD.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-6JOJ2NN4.mjs → chunk-OEZNHUL2.mjs} +5 -6
- package/dist/lib/node-esm/chunk-OEZNHUL2.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UFHDB2OA.mjs → chunk-ZOJVKPCA.mjs} +20 -20
- package/dist/lib/node-esm/chunk-ZOJVKPCA.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +15 -15
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-WXHFNJJI.mjs → intent-resolver-6ZGBUILG.mjs} +10 -9
- package/dist/lib/node-esm/intent-resolver-6ZGBUILG.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-TP6IYSR4.mjs → react-surface-Y6AOXM75.mjs} +5 -5
- package/dist/lib/node-esm/{types.mjs → types/index.mjs} +3 -3
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/components/AutomationContainer.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +6 -5
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +43 -3
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsContainer.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +2 -2
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +43 -3
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +29 -29
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +3 -3
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +35 -33
- package/src/AutomationPlugin.tsx +3 -3
- package/src/capabilities/app-graph-builder.ts +2 -2
- package/src/capabilities/intent-resolver.ts +7 -7
- package/src/components/AutomationContainer.tsx +11 -13
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +11 -8
- package/src/components/AutomationPanel/AutomationPanel.tsx +15 -27
- package/src/components/FunctionsContainer.tsx +10 -12
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +2 -2
- package/src/components/TriggerEditor/SpecSelector.tsx +14 -14
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +12 -9
- package/src/components/TriggerEditor/TriggerEditor.tsx +6 -12
- package/src/translations.ts +6 -4
- package/src/types/index.ts +5 -0
- package/src/{types.ts → types/schema.ts} +2 -4
- package/dist/lib/browser/AutomationContainer-OGNK3HD5.mjs.map +0 -7
- package/dist/lib/browser/AutomationPanel-PRIIAXD5.mjs +0 -11
- package/dist/lib/browser/FunctionsContainer-JY7V7PLF.mjs.map +0 -7
- package/dist/lib/browser/chunk-4E2KPMLB.mjs.map +0 -7
- package/dist/lib/browser/chunk-C5VOC5EE.mjs.map +0 -7
- package/dist/lib/browser/chunk-N5VLW7UZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-VQWJ5UYA.mjs +0 -14
- package/dist/lib/browser/intent-resolver-AX46HSU7.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -8
- package/dist/lib/node/AutomationContainer-B7PSJFIS.cjs +0 -66
- package/dist/lib/node/AutomationContainer-B7PSJFIS.cjs.map +0 -7
- package/dist/lib/node/AutomationPanel-XYLZU4MI.cjs +0 -32
- package/dist/lib/node/AutomationPanel-XYLZU4MI.cjs.map +0 -7
- package/dist/lib/node/FunctionsContainer-4FGOQW5X.cjs +0 -67
- package/dist/lib/node/FunctionsContainer-4FGOQW5X.cjs.map +0 -7
- package/dist/lib/node/FunctionsPanel-EWWAZK3W.cjs +0 -31
- package/dist/lib/node/FunctionsPanel-EWWAZK3W.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-5XRIIV7E.cjs +0 -96
- package/dist/lib/node/app-graph-builder-5XRIIV7E.cjs.map +0 -7
- package/dist/lib/node/chunk-3EF7MLFX.cjs +0 -38
- package/dist/lib/node/chunk-3EF7MLFX.cjs.map +0 -7
- package/dist/lib/node/chunk-6X3XJ4VI.cjs +0 -122
- package/dist/lib/node/chunk-6X3XJ4VI.cjs.map +0 -7
- package/dist/lib/node/chunk-GIIVTK4O.cjs +0 -58
- package/dist/lib/node/chunk-GIIVTK4O.cjs.map +0 -7
- package/dist/lib/node/chunk-IXUCZ3YY.cjs +0 -173
- package/dist/lib/node/chunk-IXUCZ3YY.cjs.map +0 -7
- package/dist/lib/node/chunk-LQ6XK4N5.cjs +0 -253
- package/dist/lib/node/chunk-LQ6XK4N5.cjs.map +0 -7
- package/dist/lib/node/chunk-TH4XDKAY.cjs +0 -49
- package/dist/lib/node/chunk-TH4XDKAY.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -124
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-EAREQZFE.cjs +0 -92
- package/dist/lib/node/intent-resolver-EAREQZFE.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-OI6CDHEI.cjs +0 -87
- package/dist/lib/node/react-surface-OI6CDHEI.cjs.map +0 -7
- package/dist/lib/node/types.cjs +0 -30
- package/dist/lib/node/types.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationContainer-ANCUYDDA.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-25M5VT3J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2T2OZC3A.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6JOJ2NN4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UFHDB2OA.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-WXHFNJJI.mjs.map +0 -7
- package/dist/types/src/types.d.ts.map +0 -1
- /package/dist/lib/browser/{AutomationPanel-PRIIAXD5.mjs.map → AutomationPanel-N5HFJJXW.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsPanel-LY4IFKR7.mjs.map → FunctionsPanel-I443Y6KB.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-VQWJ5UYA.mjs.map → chunk-EIY2EUWC.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-IHAKPP5A.mjs.map → chunk-GW5U2DGT.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-Z7A272CA.mjs.map → react-surface-M52XGLXY.mjs.map} +0 -0
- /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{AutomationPanel-Y3ODAHH7.mjs.map → AutomationPanel-MKOLA2FE.mjs.map} +0 -0
- /package/dist/lib/node-esm/{FunctionsPanel-HVGF5AJP.mjs.map → FunctionsPanel-ELINCXPW.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-WJHKFPX2.mjs.map → chunk-CICQ73ZT.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-HCCLRNMJ.mjs.map → chunk-NK5N3QKD.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-TP6IYSR4.mjs.map → react-surface-Y6AOXM75.mjs.map} +0 -0
- /package/dist/lib/node-esm/{types.mjs.map → types/index.mjs.map} +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AutomationPanel,
|
|
3
|
-
AutomationPanel_default
|
|
4
|
-
} from "./chunk-C5VOC5EE.mjs";
|
|
5
|
-
import "./chunk-N5VLW7UZ.mjs";
|
|
6
|
-
import "./chunk-IHAKPP5A.mjs";
|
|
7
|
-
export {
|
|
8
|
-
AutomationPanel,
|
|
9
|
-
AutomationPanel_default as default
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=AutomationPanel-PRIIAXD5.mjs.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,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
|
-
}
|
|
@@ -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,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
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/AutomationPanel/AutomationPanel.tsx", "../../../src/components/AutomationPanel/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\nimport React, { useState } from 'react';\n\nimport { Filter, Obj } from '@dxos/echo';\nimport {\n FunctionType,\n FunctionTrigger,\n FunctionTriggerSchema,\n type FunctionTriggerType,\n ScriptType,\n TriggerKind,\n} from '@dxos/functions';\nimport { type Client, useClient } from '@dxos/react-client';\nimport { useQuery, type Space, getSpace } from '@dxos/react-client/echo';\nimport { Clipboard, IconButton, Input, Separator, useTranslation } from '@dxos/react-ui';\nimport { ControlItem, 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';\nimport { TriggerEditor, type TriggerEditorProps } from '../TriggerEditor';\n\nconst grid = 'grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]';\n\nexport type AutomationPanelProps = {\n space: Space;\n object?: Obj.Any;\n initialTrigger?: FunctionTriggerType;\n onDone?: () => void;\n};\n\n// TODO(burdon): Factor out common layout with ViewEditor.\nexport const AutomationPanel = ({ space, object, initialTrigger, onDone }: AutomationPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const client = useClient();\n const triggers = useQuery(space, Filter.type(FunctionTrigger));\n const functions = useQuery(space, Filter.type(FunctionType));\n const scripts = useQuery(space, Filter.type(ScriptType));\n\n const [trigger, setTrigger] = useState<FunctionTriggerType | undefined>(initialTrigger);\n const [selected, setSelected] = useState<FunctionTrigger>();\n\n const handleSelect = (trigger: FunctionTrigger) => {\n const { id: _, ...values } = trigger;\n setTrigger(values);\n setSelected(trigger);\n };\n\n const handleAdd = () => {\n setTrigger(Obj.make(FunctionTriggerSchema, {}));\n setSelected(undefined);\n };\n\n const handleDelete = (trigger: FunctionTrigger) => {\n space.db.remove(trigger);\n setTrigger(undefined);\n setSelected(undefined);\n };\n\n const handleSave: TriggerEditorProps['onSave'] = (trigger) => {\n if (selected) {\n Object.assign(selected, trigger);\n } else {\n space.db.add(Obj.make(FunctionTrigger, trigger));\n }\n\n setTrigger(undefined);\n setSelected(undefined);\n onDone?.();\n };\n\n const handleCancel: TriggerEditorProps['onCancel'] = () => {\n setTrigger(undefined);\n onDone?.();\n };\n\n if (trigger) {\n return (\n <ControlItem title={t('trigger editor title')}>\n <TriggerEditor space={space} trigger={trigger} onSave={handleSave} onCancel={handleCancel} />\n </ControlItem>\n );\n }\n\n return (\n <div className={controlItemClasses}>\n {triggers.length > 0 && (\n <List.Root<FunctionTrigger> items={triggers} isItem={Schema.is(FunctionTrigger)} getId={(field) => field.id}>\n {({ items: triggers }) => (\n <div role='list' className='flex flex-col w-full'>\n {triggers?.map((trigger) => {\n const copyAction = getCopyAction(client, trigger);\n return (\n <List.Item<FunctionTrigger>\n key={trigger.id}\n item={trigger}\n classNames={mx(grid, ghostHover, 'items-center', 'px-2')}\n >\n <Input.Root>\n <Input.Switch\n checked={trigger.enabled}\n onCheckedChange={(checked) => (trigger.enabled = checked)}\n />\n </Input.Root>\n\n <div className={'flex'}>\n <List.ItemTitle\n classNames='px-1 cursor-pointer w-0 shrink truncate'\n onClick={() => handleSelect(trigger)}\n >\n {getFunctionName(scripts, functions, trigger) ?? '∅'}\n </List.ItemTitle>\n\n {/* TODO: a better way to expose copy action */}\n {copyAction && (\n <Clipboard.IconButton\n label={t(copyAction.translationKey)}\n value={copyAction.contentProvider()}\n />\n )}\n </div>\n\n <List.ItemDeleteButton onClick={() => handleDelete(trigger)} />\n </List.Item>\n );\n })}\n </div>\n )}\n </List.Root>\n )}\n {triggers.length > 0 && <Separator classNames='mlb-4' />}\n <IconButton icon='ph--plus--regular' label={t('new trigger label')} onClick={handleAdd} />\n </div>\n );\n};\n\nconst getCopyAction = (client: Client, trigger: FunctionTrigger | undefined) => {\n if (trigger?.spec?.kind === TriggerKind.Email) {\n return { translationKey: 'trigger copy email', contentProvider: () => `${getSpace(trigger)!.id}@dxos.network` };\n }\n\n if (trigger?.spec?.kind === TriggerKind.Webhook) {\n return { translationKey: 'trigger copy url', contentProvider: () => getWebhookUrl(client, trigger) };\n }\n\n return undefined;\n};\n\nconst getWebhookUrl = (client: Client, trigger: FunctionTrigger) => {\n const spaceId = getSpace(trigger)!.id;\n const edgeUrl = new URL(client.config.values.runtime!.services!.edge!.url!);\n const isSecure = edgeUrl.protocol.startsWith('https') || edgeUrl.protocol.startsWith('wss');\n edgeUrl.protocol = isSecure ? 'https' : 'http';\n return new URL(`/webhook/${spaceId}:${trigger.id}`, edgeUrl).toString();\n};\n\nconst getFunctionName = (scripts: ScriptType[], functions: FunctionType[], trigger: FunctionTriggerType) => {\n // TODO(wittjosiah): Truncation should be done in the UI.\n // Warning that the List component is currently a can of worms.\n const shortId = trigger.function && `${trigger.function.dxn.toString().slice(0, 16)}…`;\n const functionObject = functions.find((fn) => fn === trigger.function?.target);\n if (!functionObject) {\n return shortId;\n }\n\n return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { AutomationPanel } from './AutomationPanel';\n\nexport * from './AutomationPanel';\n\nexport default AutomationPanel;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,SAASA,cAAc;AACvB,OAAOC,SAASC,gBAAgB;AAEhC,SAASC,QAAQC,WAAW;AAC5B,SACEC,cACAC,iBACAC,uBAEAC,YACAC,mBACK;AACP,SAAsBC,iBAAiB;AACvC,SAASC,UAAsBC,gBAAgB;AAC/C,SAASC,WAAWC,YAAYC,OAAOC,WAAWC,sBAAsB;AACxE,SAASC,aAAaC,0BAA0B;AAChD,SAASC,YAAY;AACrB,SAASC,YAAYC,UAAU;AAK/B,IAAMC,OAAO;AAUN,IAAMC,kBAAkB,CAAC,EAAEC,OAAOC,QAAQC,gBAAgBC,OAAM,MAAwB;;;AAC7F,UAAM,EAAEC,EAAC,IAAKC,eAAeC,iBAAAA;AAC7B,UAAMC,SAASC,UAAAA;AACf,UAAMC,WAAWC,SAASV,OAAOW,OAAOC,KAAKC,eAAAA,CAAAA;AAC7C,UAAMC,YAAYJ,SAASV,OAAOW,OAAOC,KAAKG,YAAAA,C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B;MAAoBE,iBAAiB,MAAMU,cAAcnF,QAAQW,OAAAA;IAAS;EACrG;AAEA,SAAOa;AACT;AAEA,IAAM2D,gBAAgB,CAACnF,QAAgBW,YAAAA;AACrC,QAAMyE,UAAUH,SAAStE,OAAAA,EAAUM;AACnC,QAAMoE,UAAU,IAAIC,IAAItF,OAAOuF,OAAOpE,OAAOqE,QAASC,SAAUC,KAAMC,GAAG;AACzE,QAAMC,WAAWP,QAAQQ,SAASC,WAAW,OAAA,KAAYT,QAAQQ,SAASC,WAAW,KAAA;AACrFT,UAAQQ,WAAWD,WAAW,UAAU;AACxC,SAAO,IAAIN,IAAI,YAAYF,OAAAA,IAAWzE,QAAQM,EAAE,IAAIoE,OAAAA,EAASU,SAAQ;AACvE;AAEA,IAAM5B,kBAAkB,CAAC1D,SAAuBF,WAA2BI,YAAAA;AAGzE,QAAMqF,UAAUrF,QAAQsF,YAAY,GAAGtF,QAAQsF,SAASC,IAAIH,SAAQ,EAAGI,MAAM,GAAG,EAAA,CAAA;AAChF,QAAMC,iBAAiB7F,UAAU8F,KAAK,CAACC,OAAOA,OAAO3F,QAAQsF,UAAUM,MAAAA;AACvE,MAAI,CAACH,gBAAgB;AACnB,WAAOJ;EACT;AAEA,SAAOvF,QAAQ4F,KAAK,CAACG,MAAMJ,eAAeK,QAAQF,QAAQtF,OAAOuF,EAAEvF,EAAE,GAAGyF,QAAQV;AAClF;;;AClKA,IAAA,0BAAeW;",
|
|
6
|
-
"names": ["Schema", "React", "useState", "Filter", "Obj", "FunctionType", "FunctionTrigger", "FunctionTriggerSchema", "ScriptType", "TriggerKind", "useClient", "useQuery", "getSpace", "Clipboard", "IconButton", "Input", "Separator", "useTranslation", "ControlItem", "controlItemClasses", "List", "ghostHover", "mx", "grid", "AutomationPanel", "space", "object", "initialTrigger", "onDone", "t", "useTranslation", "AUTOMATION_PLUGIN", "client", "useClient", "triggers", "useQuery", "Filter", "type", "FunctionTrigger", "functions", "FunctionType", "scripts", "ScriptType", "trigger", "setTrigger", "useState", "selected", "setSelected", "handleSelect", "id", "_", "values", "handleAdd", "Obj", "make", "FunctionTriggerSchema", "undefined", "handleDelete", "db", "remove", "handleSave", "Object", "assign", "add", "handleCancel", "ControlItem", "title", "TriggerEditor", "onSave", "onCancel", "div", "className", "controlItemClasses", "length", "List", "Root", "items", "isItem", "Schema", "is", "getId", "field", "role", "map", "copyAction", "getCopyAction", "Item", "key", "item", "classNames", "mx", "ghostHover", "Input", "Switch", "checked", "enabled", "onCheckedChange", "ItemTitle", "onClick", "getFunctionName", "Clipboard", "IconButton", "label", "translationKey", "value", "contentProvider", "ItemDeleteButton", "Separator", "icon", "spec", "kind", "TriggerKind", "Email", "getSpace", "Webhook", "getWebhookUrl", "spaceId", "edgeUrl", "URL", "config", "runtime", "services", "edge", "url", "isSecure", "protocol", "startsWith", "toString", "shortId", "function", "dxn", "slice", "functionObject", "find", "fn", "target", "s", "source", "name", "AutomationPanel"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/TriggerEditor/TriggerEditor.tsx", "../../../src/components/TriggerEditor/FunctionInputEditor.tsx", "../../../src/components/TriggerEditor/SpecSelector.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { ComputeGraph } from '@dxos/conductor';\nimport { Type } from '@dxos/echo';\nimport {\n FunctionType,\n FunctionTriggerSchema,\n type FunctionTriggerType,\n type FunctionTrigger,\n ScriptType,\n} from '@dxos/functions';\nimport { Filter, Ref, useQuery, type Space } from '@dxos/react-client/echo';\nimport { type CustomInputMap, Form, SelectInput, useRefQueryLookupHandler } from '@dxos/react-ui-form';\n\nimport { FunctionInputEditor, type FunctionInputEditorProps } from './FunctionInputEditor';\nimport { SpecSelector } from './SpecSelector';\n\nexport type TriggerEditorProps = {\n space: Space;\n trigger: FunctionTriggerType;\n onSave?: (trigger: Omit<FunctionTrigger, 'id'>) => void;\n onCancel?: () => void;\n};\n\nexport const TriggerEditor = ({ space, trigger, onSave, onCancel }: TriggerEditorProps) => {\n const handleSave = (values: FunctionTriggerType) => {\n onSave?.(values);\n };\n\n const handleRefQueryLookup = useRefQueryLookupHandler({ space });\n const Custom = useCustomInputs(space, handleRefQueryLookup);\n\n return (\n <Form\n outerSpacing={false}\n Custom={Custom}\n schema={FunctionTriggerSchema}\n values={trigger}\n onSave={handleSave}\n onCancel={onCancel}\n onQueryRefOptions={handleRefQueryLookup}\n />\n );\n};\n\nconst useCustomInputs = (space: Space, onQueryRefOptions: FunctionInputEditorProps['onQueryRefOptions']) => {\n const functions = useQuery(space, Filter.type(FunctionType));\n const workflows = useQuery(space, Filter.type(ComputeGraph));\n const scripts = useQuery(space, Filter.type(ScriptType));\n\n return useMemo(\n (): CustomInputMap => ({\n // Function selector.\n ['function' satisfies keyof FunctionTriggerType]: (props) => {\n const getValue = useCallback(() => {\n const formValue = props.getValue();\n if (Ref.isRef(formValue)) {\n return formValue.dxn.toString() as string;\n }\n return undefined;\n }, [props]);\n\n const handleOnValueChange = useCallback(\n (_type: any, dxnString: string) => {\n const dxn = Type.DXN.parse(dxnString);\n if (dxn) {\n const ref = Ref.fromDXN(dxn);\n props.onValueChange('object', ref);\n }\n },\n [props.onValueChange],\n );\n\n return (\n <SelectInput\n {...props}\n getValue={getValue as any}\n onValueChange={handleOnValueChange}\n options={getWorkflowOptions(workflows).concat(getFunctionOptions(scripts, functions))}\n />\n );\n },\n\n // Spec selector.\n ['spec.kind' as const]: SpecSelector,\n\n // Function input editor.\n ['input' as const]: (props) => (\n <FunctionInputEditor {...props} functions={functions} onQueryRefOptions={onQueryRefOptions} />\n ),\n }),\n [workflows, scripts, functions],\n );\n};\n\nconst getWorkflowOptions = (graphs: ComputeGraph[]) => {\n return graphs.map((graph) => ({ label: `compute-${graph.id}`, value: `dxn:echo:@:${graph.id}` }));\n};\n\nconst getFunctionOptions = (scripts: ScriptType[], functions: FunctionType[]) => {\n const getLabel = (fn: FunctionType) => scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;\n return functions.map((fn) => ({ label: getLabel(fn), value: `dxn:echo:@:${fn.id}` }));\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Ref, Type } from '@dxos/echo';\nimport { type JsonPath } from '@dxos/echo-schema';\nimport { type FunctionType } from '@dxos/functions';\nimport { useOnTransition } from '@dxos/react-ui';\nimport { Form, type FormInputStateProps, type QueryRefOptions, useFormValues } from '@dxos/react-ui-form';\n\nexport type FunctionInputEditorProps = {\n functions: FunctionType[];\n onQueryRefOptions: QueryRefOptions;\n} & FormInputStateProps;\n\n/**\n * Editor component for function input parameters.\n */\nexport const FunctionInputEditor = ({\n functions,\n getValue,\n onValueChange,\n onQueryRefOptions,\n}: FunctionInputEditorProps) => {\n const selectedFunctionValue = useFormValues(['function' as JsonPath]);\n const selectedFunctionId = useMemo(() => {\n if (Ref.isRef(selectedFunctionValue)) {\n return selectedFunctionValue.dxn.toString().split('dxn:echo:@:').at(1);\n }\n }, [selectedFunctionValue]);\n\n const selectedFunction = useMemo(\n () => functions.find((fn) => fn.id === selectedFunctionId),\n [functions, selectedFunctionId],\n );\n\n useOnTransition(\n // Clear function parameter input when the function changes.\n selectedFunctionValue,\n (prevValue) => prevValue !== undefined && prevValue !== selectedFunctionValue,\n (currValue) => currValue !== undefined,\n () => onValueChange('object', {}),\n );\n\n const inputSchema = useMemo(() => selectedFunction?.inputSchema, [selectedFunction]);\n const effectSchema = useMemo(() => (inputSchema ? Type.toEffectSchema(inputSchema) : undefined), [inputSchema]);\n const propertyCount = inputSchema?.properties ? Object.keys(inputSchema.properties).length : 0;\n\n const values = useMemo(() => getValue() ?? {}, [getValue]);\n\n const handleValuesChanged = useCallback(\n (values: any) => {\n onValueChange('object', values);\n },\n [onValueChange],\n );\n\n if (selectedFunction === undefined || effectSchema === undefined || propertyCount === 0) {\n return null;\n }\n\n return (\n <>\n <h3 className='text-md'>Function parameters</h3>\n {/* TODO(ZaymonFC): Try using <FormFields /> internal component for this nesting.\n This would allow errors to flow up to the root context. */}\n <Form\n schema={effectSchema}\n values={values}\n onValuesChanged={handleValuesChanged}\n onQueryRefOptions={onQueryRefOptions}\n outerSpacing={false}\n />\n </>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { type FunctionTriggerType, TriggerKind, type TriggerType } from '@dxos/functions';\nimport { useTranslation } from '@dxos/react-ui';\nimport { SelectInput, type InputProps, useInputProps } from '@dxos/react-ui-form';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nexport type SpecSelectorProps = InputProps;\n\nexport const SpecSelector = (props: SpecSelectorProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const specProps = useInputProps(['spec' satisfies keyof FunctionTriggerType]);\n\n const handleTypeChange = useCallback(\n (_type: any, value: string): TriggerType | undefined => {\n const getDefaultTriggerSpec = (kind: string) => {\n switch (kind) {\n case TriggerKind.Timer:\n return { kind: TriggerKind.Timer, cron: '' };\n case TriggerKind.Subscription:\n return { kind: TriggerKind.Subscription, filter: {} };\n case TriggerKind.Queue:\n return { kind: TriggerKind.Queue, queue: '' };\n case TriggerKind.Email:\n return { kind: TriggerKind.Email };\n case TriggerKind.Webhook:\n return { kind: TriggerKind.Webhook };\n default:\n return undefined;\n }\n };\n\n const defaultSpec = getDefaultTriggerSpec(value);\n if (!defaultSpec) {\n return;\n }\n\n // Update the entire spec object, not just the `spec.kind`.\n specProps.onValueChange('object', defaultSpec);\n },\n [specProps],\n );\n\n const options = useMemo(\n () =>\n Object.values(TriggerKind).map((kind) => ({\n value: kind,\n label: t(`trigger type ${kind}`),\n })),\n [t],\n );\n\n return <SelectInput {...props} options={options} onValueChange={handleTypeChange} />;\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,OAAOA,UAASC,eAAA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gBAAMiB,cAAc,UAAUF,GAAAA;QAChC;MACF,GACA;QAACf,MAAMiB;OAAc;AAGvB,aACE,gBAAAjC,OAAA,cAACkC,cAAAA;QACE,GAAGlB;QACJC;QACAgB,eAAeR;QACfU,SAASC,mBAAmBzB,SAAAA,EAAW0B,OAAOC,mBAAmBzB,SAASP,SAAAA,CAAAA;;IAGhF;;IAGA,CAAC,WAAA,GAAuBiC;;IAGxB,CAAC,OAAA,GAAmB,CAACvB,UACnB,gBAAAhB,OAAA,cAACwC,qBAAAA;MAAqB,GAAGxB;MAAOV;MAAsBD;;EAE1D,IACA;IAACM;IAAWE;IAASP;GAAU;AAEnC;AAEA,IAAM8B,qBAAqB,CAACK,WAAAA;AAC1B,SAAOA,OAAOC,IAAI,CAACC,WAAW;IAAEC,OAAO,WAAWD,MAAME,EAAE;IAAIC,OAAO,cAAcH,MAAME,EAAE;EAAG,EAAA;AAChG;AAEA,IAAMP,qBAAqB,CAACzB,SAAuBP,cAAAA;AACjD,QAAMyC,WAAW,CAACC,OAAqBnC,QAAQoC,KAAK,CAACC,MAAMF,GAAGG,QAAQC,QAAQP,OAAOK,EAAEL,EAAE,GAAGQ,QAAQL,GAAGK;AACvG,SAAO/C,UAAUoC,IAAI,CAACM,QAAQ;IAAEJ,OAAOG,SAASC,EAAAA;IAAKF,OAAO,cAAcE,GAAGH,EAAE;EAAG,EAAA;AACpF;",
|
|
6
|
-
"names": ["React", "useCallback", "useMemo", "ComputeGraph", "Type", "FunctionType", "FunctionTriggerSchema", "ScriptType", "Filter", "Ref", "useQuery", "Form", "SelectInput", "useRefQueryLookupHandler", "React", "useCallback", "useMemo", "Ref", "Type", "useOnTransition", "Form", "useFormValues", "FunctionInputEditor", "functions", "getValue", "onValueChange", "onQueryRefOptions", "selectedFunctionValue", "useFormValues", "selectedFunctionId", "useMemo", "Ref", "isRef", "dxn", "toString", "split", "at", "selectedFunction", "find", "fn", "id", "useOnTransition", "prevValue", "undefined", "currValue", "inputSchema", "effectSchema", "Type", "toEffectSchema", "propertyCount", "properties", "Object", "keys", "length", "values", "handleValuesChanged", "useCallback", "h3", "className", "Form", "schema", "onValuesChanged", "outerSpacing", "React", "useCallback", "useMemo", "TriggerKind", "useTranslation", "SelectInput", "useInputProps", "SpecSelector", "props", "t", "useTranslation", "AUTOMATION_PLUGIN", "specProps", "useInputProps", "handleTypeChange", "useCallback", "_type", "value", "getDefaultTriggerSpec", "kind", "TriggerKind", "Timer", "cron", "Subscription", "filter", "Queue", "queue", "Email", "Webhook", "undefined", "defaultSpec", "onValueChange", "options", "useMemo", "Object", "values", "map", "label", "React", "SelectInput", "TriggerEditor", "space", "trigger", "onSave", "onCancel", "handleSave", "values", "handleRefQueryLookup", "useRefQueryLookupHandler", "Custom", "useCustomInputs", "React", "Form", "outerSpacing", "schema", "FunctionTriggerSchema", "onQueryRefOptions", "functions", "useQuery", "Filter", "type", "FunctionType", "workflows", "ComputeGraph", "scripts", "ScriptType", "useMemo", "props", "getValue", "useCallback", "formValue", "Ref", "isRef", "dxn", "toString", "undefined", "handleOnValueChange", "_type", "dxnString", "Type", "DXN", "parse", "ref", "fromDXN", "onValueChange", "SelectInput", "options", "getWorkflowOptions", "concat", "getFunctionOptions", "SpecSelector", "FunctionInputEditor", "graphs", "map", "graph", "label", "id", "value", "getLabel", "fn", "find", "s", "source", "target", "name"]
|
|
7
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// packages/plugins/plugin-automation/src/components/index.ts
|
|
2
|
-
import { lazy } from "react";
|
|
3
|
-
var AutomationContainer = lazy(() => import("./AutomationContainer-OGNK3HD5.mjs"));
|
|
4
|
-
var AutomationPanel = lazy(() => import("./AutomationPanel-PRIIAXD5.mjs"));
|
|
5
|
-
var FunctionsContainer = lazy(() => import("./FunctionsContainer-JY7V7PLF.mjs"));
|
|
6
|
-
var FunctionsPanel = lazy(() => import("./FunctionsPanel-LY4IFKR7.mjs"));
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
AutomationContainer,
|
|
10
|
-
AutomationPanel,
|
|
11
|
-
FunctionsContainer,
|
|
12
|
-
FunctionsPanel
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=chunk-VQWJ5UYA.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n contributes,\n Capabilities,\n createResolver,\n type PluginContext,\n createIntent,\n LayoutAction,\n} from '@dxos/app-framework';\nimport { Obj, Ref } from '@dxos/echo';\nimport { FunctionTrigger, FunctionType, ScriptType, TriggerKind } from '@dxos/functions';\nimport { type DXN } from '@dxos/keys';\nimport { ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';\nimport { SpaceAction } from '@dxos/plugin-space/types';\nimport { Filter } from '@dxos/react-client/echo';\n\nimport { AutomationAction } from '../types';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.IntentResolver, [\n createResolver({\n intent: AutomationAction.CreateTriggerFromTemplate,\n resolve: async ({ space, template, enabled = false, scriptName, input }) => {\n const trigger = Obj.make(FunctionTrigger, { enabled, input });\n\n // TODO(wittjosiah): Factor out function lookup by script name?\n if (scriptName) {\n const {\n objects: [script],\n } = await space.db.query(Filter.type(ScriptType, { name: scriptName })).run();\n if (script) {\n const {\n objects: [fn],\n } = await space.db.query(Filter.type(FunctionType, { source: Ref.make(script) })).run();\n if (fn) {\n trigger.function = Ref.make(fn);\n }\n }\n }\n\n switch (template.type) {\n case 'timer': {\n trigger.spec = { kind: TriggerKind.Timer, cron: template.cron };\n break;\n }\n case 'queue': {\n trigger.spec = { kind: TriggerKind.Queue, queue: (template.queueDXN as DXN).toString() };\n break;\n }\n default: {\n break;\n }\n }\n\n return {\n intents: [\n createIntent(SpaceAction.AddObject, { object: trigger, target: space }),\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [`automation-settings${ATTENDABLE_PATH_SEPARATOR}${space.id}`],\n options: {\n workspace: space.id,\n },\n }),\n ],\n };\n },\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,SACEA,aACAC,cACAC,gBAEAC,cACAC,oBACK;AACP,SAASC,KAAKC,WAAW;AACzB,SAASC,iBAAiBC,cAAcC,YAAYC,mBAAmB;AAEvE,SAASC,iCAAiC;AAC1C,SAASC,mBAAmB;AAC5B,SAASC,cAAc;AAIvB,IAAA,0BAAe,CAACC,YACdC,YAAYC,aAAaC,gBAAgB;EACvCC,eAAe;IACbC,QAAQC,iBAAiBC;IACzBC,SAAS,OAAO,EAAEC,OAAOC,UAAUC,UAAU,OAAOC,YAAYC,MAAK,MAAE;AACrE,YAAMC,UAAUC,IAAIC,KAAKC,iBAAiB;QAAEN;QAASE;MAAM,CAAA;AAG3D,UAAID,YAAY;AACd,cAAM,EACJM,SAAS,CAACC,MAAAA,EAAO,IACf,MAAMV,MAAMW,GAAGC,MAAMC,OAAOC,KAAKC,YAAY;UAAEC,MAAMb;QAAW,CAAA,CAAA,EAAIc,IAAG;AAC3E,YAAIP,QAAQ;AACV,gBAAM,EACJD,SAAS,CAACS,EAAAA,EAAG,IACX,MAAMlB,MAAMW,GAAGC,MAAMC,OAAOC,KAAKK,cAAc;YAAEC,QAAQC,IAAId,KAAKG,MAAAA;UAAQ,CAAA,CAAA,EAAIO,IAAG;AACrF,cAAIC,IAAI;AACNb,oBAAQiB,WAAWD,IAAId,KAAKW,EAAAA;UAC9B;QACF;MACF;AAEA,cAAQjB,SAASa,MAAI;QACnB,KAAK,SAAS;AACZT,kBAAQkB,OAAO;YAAEC,MAAMC,YAAYC;YAAOC,MAAM1B,SAAS0B;UAAK;AAC9D;QACF;QACA,KAAK,SAAS;AACZtB,kBAAQkB,OAAO;YAAEC,MAAMC,YAAYG;YAAOC,OAAQ5B,SAAS6B,SAAiBC,SAAQ;UAAG;AACvF;QACF;QACA,SAAS;AACP;QACF;MACF;AAEA,aAAO;QACLC,SAAS;UACPC,aAAaC,YAAYC,WAAW;YAAEC,QAAQ/B;YAASgC,QAAQrC;UAAM,CAAA;UACrEiC,aAAaK,aAAaC,MAAM;YAC9BC,MAAM;YACNC,SAAS;cAAC,sBAAsBC,yBAAAA,GAA4B1C,MAAM2C,EAAE;;YACpEC,SAAS;cACPC,WAAW7C,MAAM2C;YACnB;UACF,CAAA;;MAEJ;IACF;EACF,CAAA;CACD;",
|
|
6
|
-
"names": ["contributes", "Capabilities", "createResolver", "createIntent", "LayoutAction", "Obj", "Ref", "FunctionTrigger", "FunctionType", "ScriptType", "TriggerKind", "ATTENDABLE_PATH_SEPARATOR", "SpaceAction", "Filter", "context", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "AutomationAction", "CreateTriggerFromTemplate", "resolve", "space", "template", "enabled", "scriptName", "input", "trigger", "Obj", "make", "FunctionTrigger", "objects", "script", "db", "query", "Filter", "type", "ScriptType", "name", "run", "fn", "FunctionType", "source", "Ref", "function", "spec", "kind", "TriggerKind", "Timer", "cron", "Queue", "queue", "queueDXN", "toString", "intents", "createIntent", "SpaceAction", "AddObject", "object", "target", "LayoutAction", "Open", "part", "subject", "ATTENDABLE_PATH_SEPARATOR", "id", "options", "workspace"]
|
|
7
|
-
}
|
|
@@ -1,66 +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_B7PSJFIS_exports = {};
|
|
30
|
-
__export(AutomationContainer_B7PSJFIS_exports, {
|
|
31
|
-
AutomationContainer: () => AutomationContainer,
|
|
32
|
-
default: () => AutomationContainer_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(AutomationContainer_B7PSJFIS_exports);
|
|
35
|
-
var import_chunk_IXUCZ3YY = require("./chunk-IXUCZ3YY.cjs");
|
|
36
|
-
var import_chunk_LQ6XK4N5 = require("./chunk-LQ6XK4N5.cjs");
|
|
37
|
-
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
|
|
38
|
-
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
39
|
-
var import_react = __toESM(require("react"));
|
|
40
|
-
var import_react_ui = require("@dxos/react-ui");
|
|
41
|
-
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
42
|
-
var import_react_ui_stack = require("@dxos/react-ui-stack");
|
|
43
|
-
var AutomationContainer = (props) => {
|
|
44
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
45
|
-
try {
|
|
46
|
-
const { t } = (0, import_react_ui.useTranslation)(import_chunk_3EF7MLFX.AUTOMATION_PLUGIN);
|
|
47
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.StackItem.Content, {
|
|
48
|
-
classNames: "block overflow-y-auto"
|
|
49
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.ControlPage, null, /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.ControlSection, {
|
|
50
|
-
title: t("automation verbose label", {
|
|
51
|
-
ns: import_chunk_3EF7MLFX.AUTOMATION_PLUGIN
|
|
52
|
-
}),
|
|
53
|
-
description: t("automation description", {
|
|
54
|
-
ns: import_chunk_3EF7MLFX.AUTOMATION_PLUGIN
|
|
55
|
-
})
|
|
56
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_chunk_IXUCZ3YY.AutomationPanel, props))));
|
|
57
|
-
} finally {
|
|
58
|
-
_effect.f();
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
var AutomationContainer_default = AutomationContainer;
|
|
62
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
-
0 && (module.exports = {
|
|
64
|
-
AutomationContainer
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=AutomationContainer-B7PSJFIS.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 { useTranslation } from '@dxos/react-ui';\nimport { ControlSection, ControlPage } from '@dxos/react-ui-form';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport const AutomationContainer = (props: AutomationPanelProps) => {\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 {...props} />\n </ControlSection>\n </ControlPage>\n </StackItem.Content>\n );\n};\n\nexport default AutomationContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,sBAA+B;AAC/B,2BAA4C;AAC5C,4BAA0B;AAKnB,IAAMA,sBAAsB,CAACC,UAAAA;;;AAClC,UAAM,EAAEC,EAAC,QAAKC,gCAAeC,uCAAAA;AAC7B,WACE,6BAAAC,QAAA,cAACC,gCAAUC,SAAO;MAACC,YAAW;OAC5B,6BAAAH,QAAA,cAACI,kCAAAA,MACC,6BAAAJ,QAAA,cAACK,qCAAAA;MACCC,OAAOT,EAAE,4BAA4B;QAAEU,IAAIR;MAAkB,CAAA;MAC7DS,aAAaX,EAAE,0BAA0B;QAAEU,IAAIR;MAAkB,CAAA;OAEjE,6BAAAC,QAAA,cAACS,uCAAoBb,KAAAA,CAAAA,CAAAA,CAAAA;;;;AAK/B;AAEA,IAAA,8BAAeD;",
|
|
6
|
-
"names": ["AutomationContainer", "props", "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_XYLZU4MI_exports = {};
|
|
20
|
-
__export(AutomationPanel_XYLZU4MI_exports, {
|
|
21
|
-
AutomationPanel: () => import_chunk_IXUCZ3YY.AutomationPanel,
|
|
22
|
-
default: () => import_chunk_IXUCZ3YY.AutomationPanel_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(AutomationPanel_XYLZU4MI_exports);
|
|
25
|
-
var import_chunk_IXUCZ3YY = require("./chunk-IXUCZ3YY.cjs");
|
|
26
|
-
var import_chunk_LQ6XK4N5 = require("./chunk-LQ6XK4N5.cjs");
|
|
27
|
-
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
|
|
28
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
-
0 && (module.exports = {
|
|
30
|
-
AutomationPanel
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=AutomationPanel-XYLZU4MI.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["AutomationPanel-XYLZU4MI.cjs"],
|
|
4
|
-
"sourcesContent": ["import {\n AutomationPanel,\n AutomationPanel_default\n} from \"./chunk-IXUCZ3YY.cjs\";\nimport \"./chunk-LQ6XK4N5.cjs\";\nimport \"./chunk-3EF7MLFX.cjs\";\nexport {\n AutomationPanel,\n AutomationPanel_default as default\n};\n//# sourceMappingURL=AutomationPanel-XYLZU4MI.cjs.map\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAGO;AACP,4BAAO;AACP,4BAAO;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,67 +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_4FGOQW5X_exports = {};
|
|
30
|
-
__export(FunctionsContainer_4FGOQW5X_exports, {
|
|
31
|
-
FunctionsContainer: () => FunctionsContainer,
|
|
32
|
-
default: () => FunctionsContainer_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(FunctionsContainer_4FGOQW5X_exports);
|
|
35
|
-
var import_chunk_6X3XJ4VI = require("./chunk-6X3XJ4VI.cjs");
|
|
36
|
-
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
|
|
37
|
-
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
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 FunctionsContainer = ({ space }) => {
|
|
43
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
44
|
-
try {
|
|
45
|
-
const { t } = (0, import_react_ui.useTranslation)(import_chunk_3EF7MLFX.AUTOMATION_PLUGIN);
|
|
46
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.StackItem.Content, {
|
|
47
|
-
classNames: "block overflow-y-auto"
|
|
48
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.ControlPage, null, /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.ControlSection, {
|
|
49
|
-
title: t("functions verbose label", {
|
|
50
|
-
ns: import_chunk_3EF7MLFX.AUTOMATION_PLUGIN
|
|
51
|
-
}),
|
|
52
|
-
description: t("functions description", {
|
|
53
|
-
ns: import_chunk_3EF7MLFX.AUTOMATION_PLUGIN
|
|
54
|
-
})
|
|
55
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_chunk_6X3XJ4VI.FunctionsPanel, {
|
|
56
|
-
space
|
|
57
|
-
}))));
|
|
58
|
-
} finally {
|
|
59
|
-
_effect.f();
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
var FunctionsContainer_default = FunctionsContainer;
|
|
63
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
64
|
-
0 && (module.exports = {
|
|
65
|
-
FunctionsContainer
|
|
66
|
-
});
|
|
67
|
-
//# sourceMappingURL=FunctionsContainer-4FGOQW5X.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,UAAM,EAAEC,EAAC,QAAKC,gCAAeC,uCAAAA;AAC7B,WACE,6BAAAC,QAAA,cAACC,gCAAUC,SAAO;MAACC,YAAW;OAC5B,6BAAAH,QAAA,cAACI,kCAAAA,MACC,6BAAAJ,QAAA,cAACK,qCAAAA;MACCC,OAAOT,EAAE,2BAA2B;QAAEU,IAAIR;MAAkB,CAAA;MAC5DS,aAAaX,EAAE,yBAAyB;QAAEU,IAAIR;MAAkB,CAAA;OAEhE,6BAAAC,QAAA,cAACS,sCAAAA;MAAeb;;;;;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_EWWAZK3W_exports = {};
|
|
20
|
-
__export(FunctionsPanel_EWWAZK3W_exports, {
|
|
21
|
-
FunctionsPanel: () => import_chunk_6X3XJ4VI.FunctionsPanel,
|
|
22
|
-
default: () => import_chunk_6X3XJ4VI.FunctionsPanel_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(FunctionsPanel_EWWAZK3W_exports);
|
|
25
|
-
var import_chunk_6X3XJ4VI = require("./chunk-6X3XJ4VI.cjs");
|
|
26
|
-
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
FunctionsPanel
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=FunctionsPanel-EWWAZK3W.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["FunctionsPanel-EWWAZK3W.cjs"],
|
|
4
|
-
"sourcesContent": ["import {\n FunctionsPanel,\n FunctionsPanel_default\n} from \"./chunk-6X3XJ4VI.cjs\";\nimport \"./chunk-3EF7MLFX.cjs\";\nexport {\n FunctionsPanel,\n FunctionsPanel_default as default\n};\n//# sourceMappingURL=FunctionsPanel-EWWAZK3W.cjs.map\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAGO;AACP,4BAAO;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,96 +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_5XRIIV7E_exports = {};
|
|
20
|
-
__export(app_graph_builder_5XRIIV7E_exports, {
|
|
21
|
-
default: () => app_graph_builder_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(app_graph_builder_5XRIIV7E_exports);
|
|
24
|
-
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.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 = require("@dxos/echo");
|
|
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_3EF7MLFX.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_3EF7MLFX.meta.id}/space-settings-automation`,
|
|
40
|
-
data: `${import_chunk_3EF7MLFX.meta.id}/space-settings-automation`,
|
|
41
|
-
properties: {
|
|
42
|
-
label: [
|
|
43
|
-
"automation panel label",
|
|
44
|
-
{
|
|
45
|
-
ns: import_chunk_3EF7MLFX.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_3EF7MLFX.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_3EF7MLFX.meta.id}/space-settings-functions`,
|
|
59
|
-
data: `${import_chunk_3EF7MLFX.meta.id}/space-settings-functions`,
|
|
60
|
-
properties: {
|
|
61
|
-
label: [
|
|
62
|
-
"functions panel label",
|
|
63
|
-
{
|
|
64
|
-
ns: import_chunk_3EF7MLFX.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_3EF7MLFX.meta.id}/script-companion`,
|
|
74
|
-
connector: (node) => import_rx_react.Rx.make((get) => (0, import_effect.pipe)(get(node), import_effect.Option.flatMap((node2) => import_echo.Obj.instanceOf(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_3EF7MLFX.meta.id
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
icon: "ph--lightning--regular",
|
|
90
|
-
disposition: "hidden"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
]), import_effect.Option.getOrElse(() => [])))
|
|
94
|
-
})
|
|
95
|
-
]);
|
|
96
|
-
//# sourceMappingURL=app-graph-builder-5XRIIV7E.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 { Obj } from '@dxos/echo';\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) => (Obj.instanceOf(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,sBAAmB;AACnB,oBAA6B;AAE7B,2BAA8D;AAC9D,kBAAoB;AACpB,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,MAAK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;UACjDmB,MAAM;UACNQ,aAAa;QACf;MACF;KACD,GACDnB,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", "Obj", "instanceOf", "ScriptType", "join", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "disposition"]
|
|
7
|
-
}
|
|
@@ -1,38 +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_3EF7MLFX_exports = {};
|
|
20
|
-
__export(chunk_3EF7MLFX_exports, {
|
|
21
|
-
AUTOMATION_PLUGIN: () => AUTOMATION_PLUGIN,
|
|
22
|
-
meta: () => meta
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(chunk_3EF7MLFX_exports);
|
|
25
|
-
var AUTOMATION_PLUGIN = "dxos.org/plugin/automation";
|
|
26
|
-
var meta = {
|
|
27
|
-
id: AUTOMATION_PLUGIN,
|
|
28
|
-
name: "Automation",
|
|
29
|
-
description: "The Automation tab allows you to trigger pre-defined workflows related to the element you are interacting with inside of Composer.",
|
|
30
|
-
icon: "ph--robot--regular",
|
|
31
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-automation"
|
|
32
|
-
};
|
|
33
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
-
0 && (module.exports = {
|
|
35
|
-
AUTOMATION_PLUGIN,
|
|
36
|
-
meta
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=chunk-3EF7MLFX.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const AUTOMATION_PLUGIN = 'dxos.org/plugin/automation';\n\nexport const meta: PluginMeta = {\n id: AUTOMATION_PLUGIN,\n name: 'Automation',\n description:\n 'The Automation tab allows you to trigger pre-defined workflows related to the element you are interacting with inside of Composer.',\n icon: 'ph--robot--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-automation',\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,oBAAoB;AAE1B,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aACE;EACFC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
-
"names": ["AUTOMATION_PLUGIN", "meta", "id", "name", "description", "icon", "source"]
|
|
7
|
-
}
|