@burdenoff/fluidgrids-fe-sdk 2026.724.2 → 2026.727.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.
@@ -1,4 +1,4 @@
1
- export { WorkflowBuilder } from './chunk-OH5XGSAO.js';
1
+ export { WorkflowBuilder } from './chunk-27PWC67A.js';
2
2
  import './chunk-MRVS73S2.js';
3
3
  import './chunk-DBOMRIP5.js';
4
4
  import './chunk-EVKWBOYH.js';
@@ -12,5 +12,5 @@ import './chunk-H7WSQN2I.js';
12
12
  import './chunk-5BDQNSP3.js';
13
13
  import './chunk-WWU2O2SR.js';
14
14
  import './chunk-XQP33UJR.js';
15
- //# sourceMappingURL=WorkflowBuilder-JB42PH2Y.js.map
16
- //# sourceMappingURL=WorkflowBuilder-JB42PH2Y.js.map
15
+ //# sourceMappingURL=WorkflowBuilder-CMEYHL3E.js.map
16
+ //# sourceMappingURL=WorkflowBuilder-CMEYHL3E.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"WorkflowBuilder-JB42PH2Y.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"WorkflowBuilder-CMEYHL3E.js"}
@@ -35,6 +35,9 @@ import '@xyflow/react/dist/style.css';
35
35
  import { buildSchema, GraphQLObjectType, GraphQLInputObjectType, GraphQLEnumType, GraphQLInterfaceType, GraphQLUnionType, GraphQLNonNull, GraphQLList } from 'graphql';
36
36
  import { create } from 'zustand';
37
37
  import { nanoid } from 'nanoid/non-secure';
38
+ import CodeMirror from '@uiw/react-codemirror';
39
+ import { javascript } from '@codemirror/lang-javascript';
40
+ import { python } from '@codemirror/lang-python';
38
41
  import { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';
39
42
 
40
43
  function useNodeList(nodes) {
@@ -12433,6 +12436,70 @@ function SwitchRulesEditor({
12433
12436
  /* @__PURE__ */ jsx("p", { className: "text-[10px] leading-snug text-muted-foreground", children: "Rules are checked top-down; the first matching rule routes the item to its output. Each rule renders as an output handle on the node." })
12434
12437
  ] });
12435
12438
  }
12439
+ function normalizeCodeLanguage(value) {
12440
+ return typeof value === "string" && value.toLowerCase().startsWith("py") ? "python" : "javascript";
12441
+ }
12442
+ function useIsDarkTheme() {
12443
+ const [dark, setDark] = useState(
12444
+ () => typeof document !== "undefined" && document.documentElement.classList.contains("dark")
12445
+ );
12446
+ useEffect(() => {
12447
+ const root = document.documentElement;
12448
+ const observer = new MutationObserver(
12449
+ () => setDark(root.classList.contains("dark"))
12450
+ );
12451
+ observer.observe(root, { attributes: true, attributeFilter: ["class"] });
12452
+ return () => observer.disconnect();
12453
+ }, []);
12454
+ return dark;
12455
+ }
12456
+ function CodeEditorField({
12457
+ value,
12458
+ language,
12459
+ placeholder,
12460
+ onChange,
12461
+ className,
12462
+ "data-testid": testId
12463
+ }) {
12464
+ const dark = useIsDarkTheme();
12465
+ const extensions = useMemo(
12466
+ () => [language === "python" ? python() : javascript()],
12467
+ [language]
12468
+ );
12469
+ return /* @__PURE__ */ jsx(
12470
+ "div",
12471
+ {
12472
+ "data-testid": testId,
12473
+ className: cn$1(
12474
+ "overflow-hidden rounded-md border border-input text-sm transition-colors focus-within:border-primary",
12475
+ className
12476
+ ),
12477
+ onKeyDown: (e) => e.stopPropagation(),
12478
+ onMouseDown: (e) => e.stopPropagation(),
12479
+ children: /* @__PURE__ */ jsx(
12480
+ CodeMirror,
12481
+ {
12482
+ value,
12483
+ onChange,
12484
+ extensions,
12485
+ theme: dark ? "dark" : "light",
12486
+ placeholder,
12487
+ minHeight: "180px",
12488
+ maxHeight: "420px",
12489
+ basicSetup: {
12490
+ lineNumbers: true,
12491
+ foldGutter: true,
12492
+ highlightActiveLine: true,
12493
+ autocompletion: true,
12494
+ bracketMatching: true,
12495
+ closeBrackets: true,
12496
+ indentOnInput: true
12497
+ }
12498
+ }
12499
+ )
12500
+ }
12501
+ );
12502
+ }
12436
12503
  var SECTION_LABEL = "text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground";
12437
12504
  function WebhookUrlField({ webhookUrl, loading }) {
12438
12505
  const [copied, setCopied] = useState(false);
@@ -12959,6 +13026,7 @@ function NodeDetailView() {
12959
13026
  const mode = modeByField[p.name] ?? (mapping[p.name] !== void 0 ? "expression" : "fixed");
12960
13027
  const exprValue = mapping[p.name] ?? "";
12961
13028
  const fixedValue = argsState[p.name];
13029
+ const isCodeParam = p.type === "code" || node?.type === "internal:code" && p.name === "code";
12962
13030
  const highlight = dragField === p.name;
12963
13031
  const inputCx = cn$1(
12964
13032
  "w-full rounded-md border bg-background px-2.5 py-1.5 text-sm outline-none transition-colors disabled:opacity-50",
@@ -13009,6 +13077,17 @@ function NodeDetailView() {
13009
13077
  "data-testid": `ndv-param-${p.name}`,
13010
13078
  className: cn$1(inputCx, "font-mono text-primary")
13011
13079
  }
13080
+ ) : isCodeParam ? /* @__PURE__ */ jsx(
13081
+ CodeEditorField,
13082
+ {
13083
+ value: typeof fixedValue === "string" ? fixedValue : "",
13084
+ language: normalizeCodeLanguage(
13085
+ argsState.runtime ?? params.find((f) => f.name === "runtime")?.defaultValue
13086
+ ),
13087
+ placeholder: typeof p.defaultValue === "string" ? p.defaultValue : p.description,
13088
+ onChange: (v) => writeFixed(p.name, v),
13089
+ "data-testid": `ndv-param-${p.name}`
13090
+ }
13012
13091
  ) : p.type === "boolean" ? /* @__PURE__ */ jsxs("label", { className: "flex w-fit cursor-pointer items-center gap-2 text-sm", children: [
13013
13092
  /* @__PURE__ */ jsx(
13014
13093
  "input",
@@ -14232,5 +14311,5 @@ function WorkflowBuilder() {
14232
14311
  }
14233
14312
 
14234
14313
  export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, FlowBuilderPage, FluidGridsProvider, TemplateCard, WorkflowBuilder, useFluidGridsContext, useImportWorkflowTemplate, useWorkflowTemplates };
14235
- //# sourceMappingURL=chunk-OH5XGSAO.js.map
14236
- //# sourceMappingURL=chunk-OH5XGSAO.js.map
14314
+ //# sourceMappingURL=chunk-27PWC67A.js.map
14315
+ //# sourceMappingURL=chunk-27PWC67A.js.map