@burdenoff/fluidgrids-fe-sdk 2026.724.2 → 2026.728.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,6 +1,6 @@
1
1
  import { Dialog as Dialog$1, DialogContent as DialogContent$1, DialogHeader as DialogHeader$1, DialogTitle as DialogTitle$1, DialogDescription as DialogDescription$1, Input as Input$1, DialogFooter } from './chunk-MRVS73S2.js';
2
2
  import { Badge as Badge$1, Button } from './chunk-DBOMRIP5.js';
3
- import { refetchStoreNodes, registerWorkflowNodeTypes, ensureNodeConfigsLoaded, onNodeTypesUpdate, NODE_TYPES, getNodeMetadata, AVAILABLE_NODES, useInsertNode, useSaveWorkflow, useNodeExecution, getNodeDetail, ConnectionSelector, NODES_METADATA, NODE_CONFIGS, isNodeConfigsInitialized, NODES, NodePropertyPanel } from './chunk-EVKWBOYH.js';
3
+ import { refetchStoreNodes, registerWorkflowNodeTypes, ensureNodeConfigsLoaded, onNodeTypesUpdate, NODE_TYPES, getNodeMetadata, AVAILABLE_NODES, useInsertNode, useSaveWorkflow, useNodeExecution, getNodeDetail, ConnectionSelector, NODES_METADATA, NODE_CONFIGS, isNodeConfigsInitialized, NODES, NodePropertyPanel } from './chunk-LNY6ATSV.js';
4
4
  import { createGlobalStoreClient, setGlobalStoreClient, resetGlobalStoreClient, getGlobalStoreClient } from './chunk-BQXHJIER.js';
5
5
  import { BrowseWorkflowTemplatesDocument, InstallWorkflowNodeDocument, InstallPurchasedNodeDocument, GetMyNodeInstallationsDocument, BrowseWorkflowNodesDocument, UninstallWorkflowNodeDocument, CreateStoreOrderDocument } from './chunk-PNOA7CQV.js';
6
6
  import { useLazyWorkflowDefinition, useCreateWorkflow, useWorkflowVersions, useRestoreWorkflowVersion, useActivateWorkflow, useDeactivateWorkflow } from './chunk-47457KC3.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) {
@@ -2313,14 +2316,7 @@ function StoreNodeListItem({
2313
2316
  className: "w-full flex items-center gap-3 px-2 py-2.5 rounded-md hover:bg-muted/60 transition-colors text-left group",
2314
2317
  style: isDraggable ? { cursor: "grab" } : void 0,
2315
2318
  children: [
2316
- /* @__PURE__ */ jsx("div", { className: "relative size-9 shrink-0 rounded-lg bg-muted flex items-center justify-center overflow-hidden", children: icon ? /* @__PURE__ */ jsx(
2317
- "img",
2318
- {
2319
- src: icon,
2320
- alt: name,
2321
- className: "w-full h-full object-cover"
2322
- }
2323
- ) : /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-muted-foreground", children: name.charAt(0).toUpperCase() }) }),
2319
+ /* @__PURE__ */ jsx("div", { className: "relative size-9 shrink-0 rounded-lg bg-muted flex items-center justify-center overflow-hidden", children: icon ? /* @__PURE__ */ jsx("img", { src: icon, alt: name, className: "w-full h-full object-cover" }) : /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-muted-foreground", children: name.charAt(0).toUpperCase() }) }),
2324
2320
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
2325
2321
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
2326
2322
  /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground group-hover:text-primary transition-colors truncate", children: name }),
@@ -2639,7 +2635,9 @@ function StoreCategoryList({
2639
2635
  {
2640
2636
  icon: "mynaui:circle-warning",
2641
2637
  className: "size-5",
2642
- style: { color: "var(--color-status-warning-text, #d97706)" }
2638
+ style: {
2639
+ color: "var(--color-status-warning-text, #d97706)"
2640
+ }
2643
2641
  }
2644
2642
  )
2645
2643
  }
@@ -2649,7 +2647,9 @@ function StoreCategoryList({
2649
2647
  "p",
2650
2648
  {
2651
2649
  className: "text-sm font-medium group-hover:text-primary transition-colors",
2652
- style: { color: "var(--color-status-warning-text, #d97706)" },
2650
+ style: {
2651
+ color: "var(--color-status-warning-text, #d97706)"
2652
+ },
2653
2653
  children: "Deprecated"
2654
2654
  }
2655
2655
  ),
@@ -4078,7 +4078,7 @@ function DesktopSidebarFragment({
4078
4078
  if (nodes) {
4079
4079
  const requiredNodeTypes = [];
4080
4080
  try {
4081
- const { NODE_CONFIGS: NODE_CONFIGS3, ensureNodeConfigsLoaded: ensureNodeConfigsLoaded2 } = await import('./blocks-7LL2AEHB.js');
4081
+ const { NODE_CONFIGS: NODE_CONFIGS3, ensureNodeConfigsLoaded: ensureNodeConfigsLoaded2 } = await import('./blocks-7Q5XRFI7.js');
4082
4082
  await ensureNodeConfigsLoaded2().catch(() => {
4083
4083
  });
4084
4084
  const workflowNodeTypes = [
@@ -12433,6 +12433,70 @@ function SwitchRulesEditor({
12433
12433
  /* @__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
12434
  ] });
12435
12435
  }
12436
+ function normalizeCodeLanguage(value) {
12437
+ return typeof value === "string" && value.toLowerCase().startsWith("py") ? "python" : "javascript";
12438
+ }
12439
+ function useIsDarkTheme() {
12440
+ const [dark, setDark] = useState(
12441
+ () => typeof document !== "undefined" && document.documentElement.classList.contains("dark")
12442
+ );
12443
+ useEffect(() => {
12444
+ const root = document.documentElement;
12445
+ const observer = new MutationObserver(
12446
+ () => setDark(root.classList.contains("dark"))
12447
+ );
12448
+ observer.observe(root, { attributes: true, attributeFilter: ["class"] });
12449
+ return () => observer.disconnect();
12450
+ }, []);
12451
+ return dark;
12452
+ }
12453
+ function CodeEditorField({
12454
+ value,
12455
+ language,
12456
+ placeholder,
12457
+ onChange,
12458
+ className,
12459
+ "data-testid": testId
12460
+ }) {
12461
+ const dark = useIsDarkTheme();
12462
+ const extensions = useMemo(
12463
+ () => [language === "python" ? python() : javascript()],
12464
+ [language]
12465
+ );
12466
+ return /* @__PURE__ */ jsx(
12467
+ "div",
12468
+ {
12469
+ "data-testid": testId,
12470
+ className: cn$1(
12471
+ "overflow-hidden rounded-md border border-input text-sm transition-colors focus-within:border-primary",
12472
+ className
12473
+ ),
12474
+ onKeyDown: (e) => e.stopPropagation(),
12475
+ onMouseDown: (e) => e.stopPropagation(),
12476
+ children: /* @__PURE__ */ jsx(
12477
+ CodeMirror,
12478
+ {
12479
+ value,
12480
+ onChange,
12481
+ extensions,
12482
+ theme: dark ? "dark" : "light",
12483
+ placeholder,
12484
+ minHeight: "180px",
12485
+ maxHeight: "420px",
12486
+ basicSetup: {
12487
+ lineNumbers: true,
12488
+ foldGutter: true,
12489
+ highlightActiveLine: true,
12490
+ autocompletion: true,
12491
+ bracketMatching: true,
12492
+ closeBrackets: true,
12493
+ indentOnInput: true
12494
+ }
12495
+ }
12496
+ )
12497
+ }
12498
+ );
12499
+ }
12436
12500
  var SECTION_LABEL = "text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground";
12437
12501
  function WebhookUrlField({ webhookUrl, loading }) {
12438
12502
  const [copied, setCopied] = useState(false);
@@ -12959,6 +13023,7 @@ function NodeDetailView() {
12959
13023
  const mode = modeByField[p.name] ?? (mapping[p.name] !== void 0 ? "expression" : "fixed");
12960
13024
  const exprValue = mapping[p.name] ?? "";
12961
13025
  const fixedValue = argsState[p.name];
13026
+ const isCodeParam = p.type === "code" || node?.type === "internal:code" && p.name === "code";
12962
13027
  const highlight = dragField === p.name;
12963
13028
  const inputCx = cn$1(
12964
13029
  "w-full rounded-md border bg-background px-2.5 py-1.5 text-sm outline-none transition-colors disabled:opacity-50",
@@ -13009,6 +13074,17 @@ function NodeDetailView() {
13009
13074
  "data-testid": `ndv-param-${p.name}`,
13010
13075
  className: cn$1(inputCx, "font-mono text-primary")
13011
13076
  }
13077
+ ) : isCodeParam ? /* @__PURE__ */ jsx(
13078
+ CodeEditorField,
13079
+ {
13080
+ value: typeof fixedValue === "string" ? fixedValue : "",
13081
+ language: normalizeCodeLanguage(
13082
+ argsState.runtime ?? params.find((f) => f.name === "runtime")?.defaultValue
13083
+ ),
13084
+ placeholder: typeof p.defaultValue === "string" ? p.defaultValue : p.description,
13085
+ onChange: (v) => writeFixed(p.name, v),
13086
+ "data-testid": `ndv-param-${p.name}`
13087
+ }
13012
13088
  ) : p.type === "boolean" ? /* @__PURE__ */ jsxs("label", { className: "flex w-fit cursor-pointer items-center gap-2 text-sm", children: [
13013
13089
  /* @__PURE__ */ jsx(
13014
13090
  "input",
@@ -13963,7 +14039,7 @@ function WorkflowItem({
13963
14039
  };
13964
14040
  const requiredNodeTypes = [];
13965
14041
  try {
13966
- const { NODE_CONFIGS: NODE_CONFIGS3, ensureNodeConfigsLoaded: ensureNodeConfigsLoaded2 } = await import('./blocks-7LL2AEHB.js');
14042
+ const { NODE_CONFIGS: NODE_CONFIGS3, ensureNodeConfigsLoaded: ensureNodeConfigsLoaded2 } = await import('./blocks-7Q5XRFI7.js');
13967
14043
  await ensureNodeConfigsLoaded2().catch(() => {
13968
14044
  });
13969
14045
  const workflowNodeTypes = [
@@ -14232,5 +14308,5 @@ function WorkflowBuilder() {
14232
14308
  }
14233
14309
 
14234
14310
  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
14311
+ //# sourceMappingURL=chunk-U2OJNTKM.js.map
14312
+ //# sourceMappingURL=chunk-U2OJNTKM.js.map