@burdenoff/fluidgrids-fe-sdk 2026.1109.8 → 2026.1110.1

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 (48) hide show
  1. package/dist/{ExecutionDetailPage-2ORSV3YN.js → ExecutionDetailPage-PWIBQMPN.js} +10 -10
  2. package/dist/{ExecutionsListPage-MY45NECW.js → ExecutionsListPage-RP3RWPZW.js} +9 -9
  3. package/dist/{WorkflowBuilder-MWC2BCTQ.js → WorkflowBuilder-53F5WQAJ.js} +18 -12
  4. package/dist/{WorkflowsList-6AG7CFZM.js → WorkflowsList-HUKKT4RN.js} +7 -7
  5. package/dist/{agentTools-5O2KPQYJ.js → agentTools-UY6W6FKM.js} +4 -6
  6. package/dist/chunk-2TX52XRW.js +54 -0
  7. package/dist/{chunk-CX3LABFK.js → chunk-3A2A6IEK.js} +1 -1
  8. package/dist/{chunk-VYXTP6YF.js → chunk-3OG6EBHP.js} +2185 -5390
  9. package/dist/{chunk-GR3QNLFS.js → chunk-5LUYJTT4.js} +3 -3
  10. package/dist/{chunk-MSNCU6US.js → chunk-5NFUNLE7.js} +4 -4
  11. package/dist/{chunk-G4NAU6FF.js → chunk-6EXTNKOP.js} +7 -7
  12. package/dist/{chunk-5UA262ZO.js → chunk-CKF2FBUP.js} +1 -1
  13. package/dist/{chunk-3T3C3475.js → chunk-G7UY7DL4.js} +549 -2
  14. package/dist/{chunk-ACME5GOU.js → chunk-JCFFPZAB.js} +1 -1
  15. package/dist/{chunk-TNMXKPJX.js → chunk-JCXNJYDM.js} +2 -2
  16. package/dist/chunk-JIHI4L6L.js +1437 -0
  17. package/dist/{chunk-NEB4Y7AX.js → chunk-JJYKTBEF.js} +240 -33
  18. package/dist/{chunk-HZ7FQCFU.js → chunk-JNSHR2J2.js} +1 -1
  19. package/dist/{chunk-4EZFAL24.js → chunk-JSP3DAFA.js} +4 -4
  20. package/dist/{chunk-JXCJRBWD.js → chunk-K2X63CR2.js} +1 -5
  21. package/dist/{chunk-THIMC2ZD.js → chunk-KIJOFENG.js} +6 -6
  22. package/dist/{chunk-NCXK2AO6.js → chunk-KMTW6EHX.js} +2 -2
  23. package/dist/{chunk-TKSVFP36.js → chunk-L5WULSSF.js} +4 -4
  24. package/dist/{chunk-WKF72AS2.js → chunk-NODYGECM.js} +4 -4
  25. package/dist/{chunk-ZXLXZFWO.js → chunk-PL2YUQK3.js} +1 -1
  26. package/dist/{chunk-B3USL2JQ.js → chunk-PLWGPG2M.js} +1 -1
  27. package/dist/{chunk-7ADEPA4W.js → chunk-QWKO3M4W.js} +5 -5
  28. package/dist/{chunk-U52PO4QQ.js → chunk-YRSTESU3.js} +1319 -57
  29. package/dist/{chunk-QWDF72GZ.js → chunk-Z4MJLIKO.js} +1 -1
  30. package/dist/{chunk-2LERIIZM.js → chunk-ZJU462XH.js} +306 -1024
  31. package/dist/chunk-ZVJUPM3K.js +1644 -0
  32. package/dist/executions.js +11 -11
  33. package/dist/history.js +6 -8
  34. package/dist/index.js +56 -43
  35. package/dist/{node-detail-view-ZFGS3FWU.js → node-detail-view-2A3DILS6.js} +18 -863
  36. package/dist/nodes.js +1 -1
  37. package/dist/observability.js +5 -5
  38. package/dist/{quick-config-panel-ZDGYZR7Y.js → quick-config-panel-ZMP3LBFT.js} +11 -53
  39. package/dist/settings.js +7 -7
  40. package/dist/templates.js +18 -11
  41. package/dist/workflow-builder.js +19 -13
  42. package/dist/workflow-preview.js +2 -2
  43. package/dist/workflows-list.js +7 -7
  44. package/package.json +3 -2
  45. package/dist/chunk-GTEBQQ7J.js +0 -24
  46. package/dist/chunk-O2OFNGAF.js +0 -338
  47. package/dist/chunk-QTOPG7SR.js +0 -501
  48. package/dist/chunk-U7UNWR3D.js +0 -260
@@ -1,9 +1,9 @@
1
- import { validateDateRange, statusCountFilter, STATUS_COUNT_GROUP_BY, statusCountsOf } from './chunk-ACME5GOU.js';
2
- import { isAgentNodeType } from './chunk-WZ3EJVS6.js';
1
+ import { validateDateRange, statusCountFilter, STATUS_COUNT_GROUP_BY, statusCountsOf } from './chunk-JCFFPZAB.js';
3
2
  import { useAvailableTags, formatRunVersion, nodeDisplayTitle } from './chunk-DFFQYK2X.js';
4
3
  import { executionsControls } from './chunk-FNZZ5JJL.js';
5
4
  import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
6
- import { useDurableParityEnabled, formatElapsedMs, runDurationMs, nodeStateDurationMs } from './chunk-VYXTP6YF.js';
5
+ import { isAgentNodeType } from './chunk-WZ3EJVS6.js';
6
+ import { useDurableParityEnabled, formatElapsedMs, runDurationMs, nodeStateDurationMs } from './chunk-3OG6EBHP.js';
7
7
  import { SetWorkflowRunVersioningOverrideDocument, WorkflowRunsCountDocument, DurableParityRunFieldsDocument, WorkflowRunPendingDocument, WorkflowRunMetadataDocument } from './chunk-VAWYR6P4.js';
8
8
  import { useTr } from './chunk-UULVIT25.js';
9
9
  import { getFluidGridsClient } from './chunk-PDODDDHY.js';
@@ -1,11 +1,11 @@
1
- import { TEMPLATE_STORE_CATEGORIES, useImportWorkflowTemplate, FlowBuilderPage, useWorkflowTemplates, TemplateCard, useTemplateSubmissions, usePublishToStore } from './chunk-2LERIIZM.js';
2
- import { QuotaExhaustedDialog } from './chunk-QWDF72GZ.js';
1
+ import { TEMPLATE_STORE_CATEGORIES, useImportWorkflowTemplate, FlowBuilderPage, useWorkflowTemplates, TemplateCard, useTemplateSubmissions, usePublishToStore } from './chunk-ZJU462XH.js';
2
+ import { QuotaExhaustedDialog } from './chunk-Z4MJLIKO.js';
3
3
  import { templatesControls } from './chunk-FNZZ5JJL.js';
4
- import { useWorkflowDefinitions, useDuplicateWorkflow, useLazyWorkflowDefinition } from './chunk-ZXLXZFWO.js';
4
+ import { useWorkflowDefinitions, useDuplicateWorkflow, useLazyWorkflowDefinition } from './chunk-PL2YUQK3.js';
5
5
  import { useFluidGridsPageControls } from './chunk-PJAWNFJV.js';
6
6
  import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
7
- import { BILLING_PLANS_PATH, useFluidGridsAnalytics, emitTemplateUsed, isQuotaExhaustedFailure } from './chunk-VYXTP6YF.js';
8
7
  import { SdkPermissionButton, FLUIDGRIDS_PERMISSIONS } from './chunk-ERT444RG.js';
8
+ import { BILLING_PLANS_PATH, useFluidGridsAnalytics, emitTemplateUsed, isQuotaExhaustedFailure } from './chunk-3OG6EBHP.js';
9
9
  import { useTr } from './chunk-UULVIT25.js';
10
10
  import { useState, useEffect, useCallback, useMemo } from 'react';
11
11
  import { useParams, useNavigate } from 'react-router';
@@ -1,12 +1,12 @@
1
- import { paramsFromOperation } from './chunk-NEB4Y7AX.js';
2
1
  import { isGuidedTourIntent, pickGuidedTour, withoutGuidedTourIntent, isCreateIntent, decideMissingWorkflow } from './chunk-NRI7AUBH.js';
3
2
  import { registerLiveCanvasHandler } from './chunk-PIKYQE7P.js';
4
- import { useWorkflowReloadStore, releaseLeaseKeptForReload, useInstalledNodes, buildNodeCheck, FlowBuilderPage, buildRequiredNodeTypes } from './chunk-2LERIIZM.js';
5
- import { CreateWorkflowRefusalDialog } from './chunk-QWDF72GZ.js';
6
- import { canvasFromDefinition } from './chunk-5UA262ZO.js';
7
- import { useLazyWorkflowDefinition, useCreateWorkflow } from './chunk-ZXLXZFWO.js';
8
- import { refetchStoreNodes, BILLING_PLANS_PATH, ensureNodeConfigsLoaded, codeBuildIdOf, rememberRevision, blankWorkflowCreateInput, classifyCreateRefusal, NODE_CONFIGS, resolveNodeOperation, createConfiguredNode, useSaveStatusStore, workflowFingerprint, registerWorkflowNodeTypes } from './chunk-VYXTP6YF.js';
9
- import { useFlowStore, mergeStickyNotes } from './chunk-JXCJRBWD.js';
3
+ import { useWorkflowReloadStore, releaseLeaseKeptForReload, useInstalledNodes, buildNodeCheck, FlowBuilderPage, buildRequiredNodeTypes } from './chunk-ZJU462XH.js';
4
+ import { paramsFromOperation } from './chunk-JJYKTBEF.js';
5
+ import { CreateWorkflowRefusalDialog } from './chunk-Z4MJLIKO.js';
6
+ import { canvasFromDefinition } from './chunk-CKF2FBUP.js';
7
+ import { useLazyWorkflowDefinition, useCreateWorkflow } from './chunk-PL2YUQK3.js';
8
+ import { refetchStoreNodes, BILLING_PLANS_PATH, ensureNodeConfigsLoaded, codeBuildIdOf, rememberRevision, blankWorkflowCreateInput, classifyCreateRefusal, NODE_CONFIGS, resolveNodeOperation, createConfiguredNode, useSaveStatusStore, workflowFingerprint, registerWorkflowNodeTypes } from './chunk-3OG6EBHP.js';
9
+ import { useFlowStore, mergeStickyNotes } from './chunk-K2X63CR2.js';
10
10
  import { WorkflowDefinitionDocument } from './chunk-VAWYR6P4.js';
11
11
  import { useTr } from './chunk-UULVIT25.js';
12
12
  import { getFluidGridsClient } from './chunk-PDODDDHY.js';
@@ -1,4 +1,4 @@
1
- import { mergeStickyNotes } from './chunk-JXCJRBWD.js';
1
+ import { mergeStickyNotes } from './chunk-K2X63CR2.js';
2
2
 
3
3
  // src/builder/live/definition-canvas.ts
4
4
  function isRecord(value) {
@@ -1,14 +1,15 @@
1
- import { signalPayloadCard, components_default, payloadFromCardValues, parseRawSignalPayload } from './chunk-VYXTP6YF.js';
1
+ import { signalPayloadCard, payloadFromCardValues, parseRawSignalPayload } from './chunk-3OG6EBHP.js';
2
2
  import { TerminateWorkflowRunDocument, WorkflowRunHistoryDocument, RunEventAppendedDocument, DurableRunFieldsDocument, WorkflowRunDeterminismStatusDocument, WorkflowRunStackTraceDocument, SignalWorkflowRunDocument } from './chunk-VAWYR6P4.js';
3
3
  import { useTr } from './chunk-UULVIT25.js';
4
4
  import { getFluidGridsClient, getFluidGridsClientSafe } from './chunk-PDODDDHY.js';
5
5
  import { throwIfResultError, describeOperationError } from './chunk-JKLZ6YZ3.js';
6
- import { useState, useMemo, useRef, useCallback, useEffect } from 'react';
6
+ import { forwardRef, useRef, useEffect, useImperativeHandle, useState, useMemo, useCallback } from 'react';
7
7
  import { Icon } from '@iconify/react';
8
8
  import { Button } from '@burdenoff/fe-libs/button';
9
9
  import { cn } from '@burdenoff/fe-libs/utils';
10
10
  import { jsxs, jsx } from 'react/jsx-runtime';
11
11
  import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Label, Textarea, DialogFooter, Input } from '@burdenoff/fe-libs/ui';
12
+ import * as AdaptiveCards from 'adaptivecards';
12
13
 
13
14
  // src/modules/executions/utils/run-history.ts
14
15
  function isRecord(value) {
@@ -744,6 +745,552 @@ function useRunStackTrace(runId, enabled) {
744
745
  }, [refetch]);
745
746
  return { trace, loading, error, refetch };
746
747
  }
748
+
749
+ // src/modules/adaptive-cards/components/coerce.ts
750
+ function optionalDeclaration(value) {
751
+ const declaration = typeof value === "string" ? { type: value } : value;
752
+ if (!declaration || typeof declaration !== "object" || Array.isArray(declaration))
753
+ return null;
754
+ const fields = Object.fromEntries(Object.entries(declaration));
755
+ if (typeof fields.type !== "string" || !/^(string|boolean|number|integer|array(?:<.+>)?|object|json)$/i.test(
756
+ fields.type.trim()
757
+ ))
758
+ return null;
759
+ if (Object.hasOwn(fields, "required") && fields.required !== false)
760
+ return null;
761
+ return fields;
762
+ }
763
+ function coerceSubmittedDataFromCard(submittedData, cardData, context) {
764
+ const fieldTypeMap = {};
765
+ const literalDefaults = /* @__PURE__ */ new Set();
766
+ const integerFields = /* @__PURE__ */ new Set();
767
+ function extractInputTypes(elements) {
768
+ for (const element of elements) {
769
+ if (element.type?.startsWith("Input") && element.id) {
770
+ fieldTypeMap[element.id] = element.type;
771
+ if (element.value !== void 0 && (typeof element.value !== "string" || !element.value.includes("${"))) {
772
+ literalDefaults.add(element.id);
773
+ }
774
+ if (element.type === "Input.Number" && element.isInteger === true) {
775
+ integerFields.add(element.id);
776
+ }
777
+ }
778
+ if (Array.isArray(element.items)) {
779
+ extractInputTypes(element.items);
780
+ }
781
+ if (Array.isArray(element.columns)) {
782
+ for (const column of element.columns) {
783
+ if (column.items) {
784
+ extractInputTypes(column.items);
785
+ }
786
+ }
787
+ }
788
+ if (Array.isArray(element.actions)) {
789
+ extractFromActions(element.actions);
790
+ }
791
+ }
792
+ }
793
+ function extractFromActions(actions) {
794
+ for (const action of actions) {
795
+ const nested = action?.card;
796
+ if (nested && typeof nested === "object") {
797
+ if (Array.isArray(nested.body)) {
798
+ extractInputTypes(nested.body);
799
+ }
800
+ if (Array.isArray(nested.actions)) {
801
+ extractFromActions(nested.actions);
802
+ }
803
+ }
804
+ }
805
+ }
806
+ if (Array.isArray(cardData.body)) {
807
+ extractInputTypes(cardData.body);
808
+ }
809
+ if (Array.isArray(cardData.actions)) {
810
+ extractFromActions(
811
+ cardData.actions
812
+ );
813
+ }
814
+ const coercedData = {};
815
+ for (const key in submittedData) {
816
+ const value = submittedData[key];
817
+ const type = fieldTypeMap[key];
818
+ const field = key.replace(/^(?:args\.)?state\./, "");
819
+ const declaration = optionalDeclaration(context?.inputFields?.[field]);
820
+ if (context && declaration && !context.changedInputs.has(key)) {
821
+ const initialKey = [
822
+ key,
823
+ field,
824
+ `args.state.${field}`,
825
+ `state.${field}`
826
+ ].find((candidate) => Object.hasOwn(context.initialValues, candidate));
827
+ if (initialKey !== void 0) {
828
+ coercedData[key] = context.initialValues[initialKey];
829
+ continue;
830
+ }
831
+ if (Object.hasOwn(declaration, "default")) {
832
+ coercedData[key] = declaration.default;
833
+ continue;
834
+ }
835
+ if (!literalDefaults.has(key)) continue;
836
+ }
837
+ switch (type) {
838
+ case "Input.Number":
839
+ if (value === void 0 || value === "") {
840
+ coercedData[key] = void 0;
841
+ } else if (integerFields.has(key)) {
842
+ coercedData[key] = Math.trunc(Number(value));
843
+ } else {
844
+ coercedData[key] = Number(value);
845
+ }
846
+ break;
847
+ case "Input.Toggle":
848
+ coercedData[key] = value === "true" || value === true;
849
+ break;
850
+ default:
851
+ coercedData[key] = value;
852
+ }
853
+ }
854
+ return coercedData;
855
+ }
856
+ function isAdaptiveCard(data) {
857
+ return data.type === "AdaptiveCard";
858
+ }
859
+ function isCustomFormat(data) {
860
+ const record = data;
861
+ return record.type !== "AdaptiveCard" && "inputs" in record;
862
+ }
863
+ function expandTemplate(obj, data) {
864
+ if (typeof obj === "string") {
865
+ const singleVarMatch = obj.match(/^\$\{([^}]+)\}$/);
866
+ if (singleVarMatch) {
867
+ const key = singleVarMatch[1].trim();
868
+ const value = data[key];
869
+ if (value !== void 0 && value !== null) {
870
+ if (typeof value === "boolean") {
871
+ return value ? "true" : "false";
872
+ }
873
+ return value;
874
+ }
875
+ return "";
876
+ }
877
+ return obj.replace(/\$\{([^}]+)\}/g, (_match, key) => {
878
+ const trimmedKey = key.trim();
879
+ const value = data[trimmedKey];
880
+ if (value !== void 0 && value !== null) {
881
+ return String(value);
882
+ }
883
+ return "";
884
+ });
885
+ }
886
+ if (Array.isArray(obj)) {
887
+ return obj.map((item) => expandTemplate(item, data));
888
+ }
889
+ if (obj !== null && typeof obj === "object") {
890
+ const result = {};
891
+ for (const [key, value] of Object.entries(obj)) {
892
+ if (key === "defaultValue") {
893
+ continue;
894
+ }
895
+ result[key] = expandTemplate(value, data);
896
+ }
897
+ return result;
898
+ }
899
+ return obj;
900
+ }
901
+ function applyCustomStyles(container) {
902
+ const inputStyles = {
903
+ width: "100%",
904
+ padding: "0.5rem 0.75rem",
905
+ fontSize: "0.875rem",
906
+ lineHeight: "1.5",
907
+ borderRadius: "0.375rem",
908
+ border: "1px solid hsl(var(--input))",
909
+ backgroundColor: "hsl(var(--background))",
910
+ color: "hsl(var(--foreground))",
911
+ outline: "none",
912
+ transition: "border-color 0.2s ease, box-shadow 0.2s ease"
913
+ };
914
+ const addInputInteractivity = (input) => {
915
+ const originalBorder = "1px solid hsl(var(--input))";
916
+ input.addEventListener("mouseenter", () => {
917
+ if (document.activeElement !== input) {
918
+ input.style.borderColor = "hsl(var(--foreground) / 0.3)";
919
+ }
920
+ });
921
+ input.addEventListener("mouseleave", () => {
922
+ if (document.activeElement !== input) {
923
+ input.style.border = originalBorder;
924
+ }
925
+ });
926
+ input.addEventListener("focus", () => {
927
+ input.style.borderColor = "hsl(var(--ring))";
928
+ input.style.boxShadow = "0 0 0 2px hsl(var(--ring) / 0.2)";
929
+ });
930
+ input.addEventListener("blur", () => {
931
+ input.style.border = originalBorder;
932
+ input.style.boxShadow = "none";
933
+ });
934
+ };
935
+ const allInputs = container.querySelectorAll(
936
+ ".ac-textInput, .ac-numberInput, .ac-dateInput, .ac-timeInput"
937
+ );
938
+ allInputs.forEach((input) => {
939
+ Object.assign(input.style, inputStyles);
940
+ addInputInteractivity(input);
941
+ });
942
+ const textareas = container.querySelectorAll(".ac-multiline");
943
+ textareas.forEach((textarea) => {
944
+ Object.assign(textarea.style, {
945
+ ...inputStyles,
946
+ minHeight: "80px",
947
+ resize: "vertical"
948
+ });
949
+ addInputInteractivity(textarea);
950
+ });
951
+ const selects = container.querySelectorAll(
952
+ ".ac-choiceSetInput-compact, select"
953
+ );
954
+ selects.forEach((select) => {
955
+ Object.assign(select.style, {
956
+ ...inputStyles,
957
+ cursor: "pointer",
958
+ appearance: "none",
959
+ backgroundImage: `url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`,
960
+ backgroundPosition: "right 0.5rem center",
961
+ backgroundRepeat: "no-repeat",
962
+ backgroundSize: "1.5em 1.5em",
963
+ paddingRight: "2.5rem"
964
+ });
965
+ addInputInteractivity(select);
966
+ });
967
+ const radioGroups = container.querySelectorAll(
968
+ ".ac-choiceSetInput-expanded"
969
+ );
970
+ radioGroups.forEach((group) => {
971
+ Object.assign(group.style, {
972
+ display: "flex",
973
+ flexDirection: "column",
974
+ gap: "0.5rem"
975
+ });
976
+ });
977
+ const radios = container.querySelectorAll(
978
+ 'input[type="radio"]'
979
+ );
980
+ radios.forEach((radio) => {
981
+ Object.assign(radio.style, {
982
+ width: "1rem",
983
+ height: "1rem",
984
+ accentColor: "hsl(var(--primary))",
985
+ cursor: "pointer",
986
+ transition: "transform 0.1s ease"
987
+ });
988
+ radio.addEventListener("mouseenter", () => {
989
+ radio.style.transform = "scale(1.1)";
990
+ });
991
+ radio.addEventListener("mouseleave", () => {
992
+ radio.style.transform = "scale(1)";
993
+ });
994
+ radio.addEventListener("focus", () => {
995
+ radio.style.outline = "2px solid hsl(var(--ring) / 0.3)";
996
+ radio.style.outlineOffset = "2px";
997
+ });
998
+ radio.addEventListener("blur", () => {
999
+ radio.style.outline = "none";
1000
+ });
1001
+ });
1002
+ const checkboxes = container.querySelectorAll(
1003
+ 'input[type="checkbox"]'
1004
+ );
1005
+ checkboxes.forEach((checkbox) => {
1006
+ Object.assign(checkbox.style, {
1007
+ width: "1rem",
1008
+ height: "1rem",
1009
+ accentColor: "hsl(var(--primary))",
1010
+ cursor: "pointer",
1011
+ transition: "transform 0.1s ease"
1012
+ });
1013
+ checkbox.addEventListener("mouseenter", () => {
1014
+ checkbox.style.transform = "scale(1.1)";
1015
+ });
1016
+ checkbox.addEventListener("mouseleave", () => {
1017
+ checkbox.style.transform = "scale(1)";
1018
+ });
1019
+ checkbox.addEventListener("focus", () => {
1020
+ checkbox.style.outline = "2px solid hsl(var(--ring) / 0.3)";
1021
+ checkbox.style.outlineOffset = "2px";
1022
+ });
1023
+ checkbox.addEventListener("blur", () => {
1024
+ checkbox.style.outline = "none";
1025
+ });
1026
+ });
1027
+ const buttons = container.querySelectorAll(".ac-pushButton");
1028
+ buttons.forEach((button) => {
1029
+ Object.assign(button.style, {
1030
+ padding: "0.5rem 1rem",
1031
+ fontSize: "0.875rem",
1032
+ fontWeight: "500",
1033
+ borderRadius: "0.375rem",
1034
+ border: "none",
1035
+ backgroundColor: "hsl(var(--primary))",
1036
+ color: "hsl(var(--primary-foreground))",
1037
+ cursor: "pointer",
1038
+ transition: "background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease"
1039
+ });
1040
+ button.addEventListener("mouseenter", () => {
1041
+ button.style.backgroundColor = "hsl(var(--primary) / 0.9)";
1042
+ button.style.boxShadow = "0 2px 4px hsl(var(--primary) / 0.3)";
1043
+ });
1044
+ button.addEventListener("mouseleave", () => {
1045
+ button.style.backgroundColor = "hsl(var(--primary))";
1046
+ button.style.boxShadow = "none";
1047
+ });
1048
+ button.addEventListener("focus", () => {
1049
+ button.style.boxShadow = "0 0 0 2px hsl(var(--ring) / 0.3)";
1050
+ });
1051
+ button.addEventListener("blur", () => {
1052
+ button.style.boxShadow = "none";
1053
+ });
1054
+ button.addEventListener("mousedown", () => {
1055
+ button.style.transform = "scale(0.98)";
1056
+ });
1057
+ button.addEventListener("mouseup", () => {
1058
+ button.style.transform = "scale(1)";
1059
+ });
1060
+ });
1061
+ const textBlocks = container.querySelectorAll(".ac-textBlock");
1062
+ textBlocks.forEach((textBlock) => {
1063
+ if (textBlock.closest(".ac-toggleInput") || textBlock.closest(".ac-choiceSetInput-expanded")) {
1064
+ Object.assign(textBlock.style, {
1065
+ fontSize: "0.875rem",
1066
+ fontWeight: "400",
1067
+ color: "hsl(var(--foreground) / 0.8)"
1068
+ });
1069
+ } else {
1070
+ Object.assign(textBlock.style, {
1071
+ fontSize: "0.8125rem",
1072
+ fontWeight: "500",
1073
+ color: "hsl(var(--foreground) / 0.8)",
1074
+ marginBottom: "0.25rem"
1075
+ });
1076
+ }
1077
+ });
1078
+ const actionSets = container.querySelectorAll(".ac-actionSet");
1079
+ actionSets.forEach((actionSet) => {
1080
+ Object.assign(actionSet.style, {
1081
+ marginTop: "0.75rem",
1082
+ paddingTop: "0.75rem",
1083
+ borderTop: "1px solid hsl(var(--border))",
1084
+ gap: "0.5rem"
1085
+ });
1086
+ });
1087
+ const separators = container.querySelectorAll(
1088
+ ".ac-horizontal-separator"
1089
+ );
1090
+ separators.forEach((separator) => {
1091
+ Object.assign(separator.style, {
1092
+ height: "0.5rem"
1093
+ });
1094
+ });
1095
+ const images = container.querySelectorAll(".ac-image img");
1096
+ images.forEach((img) => {
1097
+ Object.assign(img.style, {
1098
+ borderRadius: "0.375rem"
1099
+ });
1100
+ });
1101
+ }
1102
+ var AdaptiveCardRenderer = forwardRef(function AdaptiveCardRenderer2({ cardData, sampleData, inputFields, onSubmit, onAction, className }, ref) {
1103
+ const cardContainerRef = useRef(null);
1104
+ const adaptiveCardInstanceRef = useRef(
1105
+ null
1106
+ );
1107
+ const initialSampleDataRef = useRef(sampleData);
1108
+ const hasRenderedRef = useRef(false);
1109
+ const submissionContextRef = useRef({ initialValues: {}, changedInputs: /* @__PURE__ */ new Set() });
1110
+ const onSubmitRef = useRef(onSubmit);
1111
+ const onActionRef = useRef(onAction);
1112
+ useEffect(() => {
1113
+ onSubmitRef.current = onSubmit;
1114
+ }, [onSubmit]);
1115
+ useEffect(() => {
1116
+ onActionRef.current = onAction;
1117
+ }, [onAction]);
1118
+ useEffect(() => {
1119
+ initialSampleDataRef.current = sampleData;
1120
+ }, [sampleData]);
1121
+ useEffect(() => {
1122
+ if (!cardData || !cardContainerRef.current) {
1123
+ adaptiveCardInstanceRef.current = null;
1124
+ return;
1125
+ }
1126
+ if (!isAdaptiveCard(cardData)) {
1127
+ console.warn(
1128
+ 'AdaptiveCardRenderer: Invalid format. Expected type "AdaptiveCard"'
1129
+ );
1130
+ cardContainerRef.current.innerHTML = "";
1131
+ adaptiveCardInstanceRef.current = null;
1132
+ return;
1133
+ }
1134
+ const adaptiveCard = new AdaptiveCards.AdaptiveCard();
1135
+ adaptiveCard.hostConfig = new AdaptiveCards.HostConfig({
1136
+ fontFamily: "inherit",
1137
+ spacing: {
1138
+ small: 6,
1139
+ default: 10,
1140
+ medium: 14,
1141
+ large: 18,
1142
+ extraLarge: 22,
1143
+ padding: 12
1144
+ },
1145
+ separator: {
1146
+ lineThickness: 1,
1147
+ lineColor: "var(--color-border-default)"
1148
+ },
1149
+ containerStyles: {
1150
+ default: {
1151
+ backgroundColor: "transparent",
1152
+ foregroundColors: {
1153
+ default: {
1154
+ default: "var(--color-text-primary)",
1155
+ subtle: "var(--color-text-muted)"
1156
+ },
1157
+ accent: {
1158
+ default: "var(--color-text-link)",
1159
+ subtle: "var(--color-text-linkHover)"
1160
+ }
1161
+ }
1162
+ }
1163
+ }
1164
+ });
1165
+ let cardToRender = cardData;
1166
+ const defaultValues = cardData.defaultValue;
1167
+ const dataToUse = initialSampleDataRef.current;
1168
+ const mergedData = {
1169
+ ...defaultValues,
1170
+ ...dataToUse
1171
+ };
1172
+ const submissionContext = {
1173
+ inputFields,
1174
+ initialValues: mergedData,
1175
+ changedInputs: /* @__PURE__ */ new Set()
1176
+ };
1177
+ submissionContextRef.current = submissionContext;
1178
+ hasRenderedRef.current = true;
1179
+ cardToRender = expandTemplate(cardData, mergedData);
1180
+ adaptiveCard.parse(cardToRender);
1181
+ adaptiveCardInstanceRef.current = adaptiveCard;
1182
+ if (Object.keys(mergedData).length > 0) {
1183
+ const allInputs = adaptiveCard.getAllInputs();
1184
+ for (const input of allInputs) {
1185
+ if (input.id && mergedData[input.id] !== void 0) {
1186
+ if (!input.value || input.value === "") {
1187
+ input.defaultValue = String(
1188
+ mergedData[input.id]
1189
+ );
1190
+ }
1191
+ }
1192
+ }
1193
+ }
1194
+ adaptiveCard.onExecuteAction = (action) => {
1195
+ if (action instanceof AdaptiveCards.SubmitAction) {
1196
+ const allInputs = adaptiveCard.getAllInputs();
1197
+ const submittedData = {};
1198
+ for (const input of allInputs) {
1199
+ if (input.id) {
1200
+ submittedData[input.id] = input.value;
1201
+ }
1202
+ }
1203
+ const serializedAction = action.toJSON();
1204
+ const actionDefinition = serializedAction && typeof serializedAction === "object" ? Object.fromEntries(Object.entries(serializedAction)) : {};
1205
+ const rawActionData = inputFields ? actionDefinition.data : action.data;
1206
+ const actionData = rawActionData && typeof rawActionData === "object" ? Object.fromEntries(Object.entries(rawActionData)) : {};
1207
+ const parsedData = inputFields ? {
1208
+ ...coerceSubmittedDataFromCard(actionData, cardData),
1209
+ ...coerceSubmittedDataFromCard(
1210
+ submittedData,
1211
+ cardData,
1212
+ submissionContext
1213
+ )
1214
+ } : coerceSubmittedDataFromCard(
1215
+ { ...submittedData, ...actionData },
1216
+ cardData
1217
+ );
1218
+ onSubmitRef.current?.(parsedData);
1219
+ }
1220
+ onActionRef.current?.(action);
1221
+ };
1222
+ const renderedCard = adaptiveCard.render();
1223
+ cardContainerRef.current.innerHTML = "";
1224
+ if (renderedCard) {
1225
+ cardContainerRef.current.appendChild(renderedCard);
1226
+ applyCustomStyles(cardContainerRef.current);
1227
+ }
1228
+ const container = cardContainerRef.current;
1229
+ const markEdited = (event) => {
1230
+ if (!(event.target instanceof Node)) return;
1231
+ for (const input of adaptiveCard.getAllInputs()) {
1232
+ if (input.id && input.renderedElement?.contains(event.target)) {
1233
+ submissionContext.changedInputs.add(input.id);
1234
+ }
1235
+ }
1236
+ };
1237
+ container.addEventListener("input", markEdited, true);
1238
+ container.addEventListener("change", markEdited, true);
1239
+ return () => {
1240
+ container.removeEventListener("input", markEdited, true);
1241
+ container.removeEventListener("change", markEdited, true);
1242
+ };
1243
+ }, [cardData, inputFields]);
1244
+ useImperativeHandle(
1245
+ ref,
1246
+ () => ({
1247
+ validateInputs() {
1248
+ const adaptiveCard = adaptiveCardInstanceRef.current;
1249
+ if (!adaptiveCard) return true;
1250
+ const invalidInputs = adaptiveCard.getAllInputs().filter((input) => !input.validateValue());
1251
+ invalidInputs[0]?.focus();
1252
+ return invalidInputs.length === 0;
1253
+ },
1254
+ collectValues() {
1255
+ const adaptiveCard = adaptiveCardInstanceRef.current;
1256
+ if (!adaptiveCard || !cardData) return {};
1257
+ const collected = {};
1258
+ for (const input of adaptiveCard.getAllInputs()) {
1259
+ if (input.id) {
1260
+ collected[input.id] = input.value;
1261
+ }
1262
+ }
1263
+ return coerceSubmittedDataFromCard(
1264
+ collected,
1265
+ cardData,
1266
+ submissionContextRef.current
1267
+ );
1268
+ }
1269
+ }),
1270
+ [cardData]
1271
+ );
1272
+ if (!cardData) {
1273
+ return null;
1274
+ }
1275
+ if (isCustomFormat(cardData)) {
1276
+ return /* @__PURE__ */ jsxs("div", { className: "p-4 border border-[var(--color-status-warning-border)] rounded bg-[var(--color-status-warning-bg-subtle)] text-sm", children: [
1277
+ /* @__PURE__ */ jsx("p", { className: "font-semibold text-[var(--color-status-warning-text)]", children: "Invalid Adaptive Card Format" }),
1278
+ /* @__PURE__ */ jsx("p", { className: "text-[var(--color-status-warning-text)] mt-1", children: "The adaptive_card is using a custom format. Please update it to use the Microsoft Adaptive Card schema." }),
1279
+ /* @__PURE__ */ jsxs("details", { className: "mt-2", children: [
1280
+ /* @__PURE__ */ jsx("summary", { className: "cursor-pointer text-[var(--color-status-warning-text)]", children: "View current data" }),
1281
+ /* @__PURE__ */ jsx("pre", { className: "mt-2 text-xs overflow-auto max-h-40", children: JSON.stringify(cardData, null, 2) })
1282
+ ] })
1283
+ ] });
1284
+ }
1285
+ return /* @__PURE__ */ jsx(
1286
+ "div",
1287
+ {
1288
+ ref: cardContainerRef,
1289
+ className: cn("adaptive-card-container", className)
1290
+ }
1291
+ );
1292
+ });
1293
+ var components_default = AdaptiveCardRenderer;
747
1294
  function useOpenSnapshot(open, value) {
748
1295
  const [snapshot, setSnapshot] = useState(
749
1296
  () => open ? { value } : null
@@ -1,5 +1,5 @@
1
1
  import { REPLAY_WORKFLOW_RUN, RETRY_WORKFLOW_RUNS } from './chunk-5ERAJC2I.js';
2
- import { useFluidGridsAnalytics, emitRunStarted, openRunQuotaUpgradePrompt } from './chunk-VYXTP6YF.js';
2
+ import { useFluidGridsAnalytics, emitRunStarted, openRunQuotaUpgradePrompt } from './chunk-3OG6EBHP.js';
3
3
  import { ExecutionsListDocument, ExecutionDetailDocument, ExecutionStatsDocument, PauseExecutionDocument, ResumeExecutionDocument, CancelExecutionDocument, RetryNodeDocument, TriggerWorkflowDocument, TerminateExecutionDocument } from './chunk-VAWYR6P4.js';
4
4
  import { useTr } from './chunk-UULVIT25.js';
5
5
  import { getFluidGridsClient } from './chunk-PDODDDHY.js';
@@ -1,9 +1,9 @@
1
1
  import { FailureTriagePanel } from './chunk-Q526TUOC.js';
2
2
  import { aiSpendPeriod, AI_SPEND_RANGE_DAYS, evidenceFacts, monthlySavingLabel, evidenceWindowDays, shortRunId, DISMISS_REASONS, MAX_DISMISS_NOTE_LENGTH, aiCost, formatTokens, runsOfWorkflowPath } from './chunk-NZAYYUQ4.js';
3
- import { useDataSinks, useDataSinkData, useInsightsData, useRunReplayActions } from './chunk-CX3LABFK.js';
3
+ import { useDataSinks, useDataSinkData, useInsightsData, useRunReplayActions } from './chunk-3A2A6IEK.js';
4
4
  import { proposalCanvasPath } from './chunk-GLYINMOR.js';
5
- import { useContinuousOptimisationEnabled } from './chunk-VYXTP6YF.js';
6
5
  import { useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, SdkPermissionButton } from './chunk-ERT444RG.js';
6
+ import { useContinuousOptimisationEnabled } from './chunk-3OG6EBHP.js';
7
7
  import { SetContinuousOptimisationEnabledDocument, FgRunOptimisationScanDocument, ProposeOptimisationDocument, WorkflowProposalDocument, DismissOptimisationSuggestionDocument, SnoozeOptimisationSuggestionDocument, WorkspaceAiUsageDocument, OptimisationSuggestionsDocument, ContinuousOptimisationSettingsDocument } from './chunk-VAWYR6P4.js';
8
8
  import { useTr } from './chunk-UULVIT25.js';
9
9
  import { getFluidGridsClient } from './chunk-PDODDDHY.js';