@oomol-lab/open-flow 0.1.0-beta.42 → 0.1.0-beta.44

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.
@@ -23052,7 +23052,7 @@ function uT({ className: e, container: t, positionMethod: n, collisionBoundary:
23052
23052
  className: zt("z-[1000] inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 [overflow-wrap:anywhere] rounded-[6px] bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-[1000] **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
23053
23053
  ...l,
23054
23054
  children: [c, /* @__PURE__ */ G(rT, {
23055
- className: "z-[1000] size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5",
23055
+ className: "z-[1000] size-2.5 translate-x-0 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5",
23056
23056
  "data-slot": "tooltip-arrow"
23057
23057
  })]
23058
23058
  })
@@ -87869,139 +87869,139 @@ function lde({ label: e, open: t, disabled: n = !1, onToggle: r }) {
87869
87869
  }
87870
87870
  //#endregion
87871
87871
  //#region src/workbench/browser/runtime/editor/revisionCanvas.tsx
87872
- function ude({ draft: e, presentation: t, theme: n, interactiveMode$: r, label: i, striped: a = !0 }) {
87873
- let o = V(null), c = p(), l = s(), u = z(() => BQ(e), [e]), [d, f] = H({ kind: "flow" }), m = d.kind === "flow" ? "flow" : `subflow:${d.id}`, [h, g] = H({}), [_, v] = H([]), [y, b] = H(!1), [x, S] = H(), C = z(() => D$(e, d, t?.value, [], {}, {}, c), [
87872
+ function ude({ draft: e, presentation: t, theme: n, interactiveMode$: r, label: i, striped: a = !0, showHeader: o = !0 }) {
87873
+ let c = V(null), l = p(), u = s(), d = z(() => BQ(e), [e]), [f, m] = H({ kind: "flow" }), h = f.kind === "flow" ? "flow" : `subflow:${f.id}`, [g, _] = H({}), [v, y] = H([]), [b, x] = H(!1), [S, C] = H(), w = z(() => D$(e, f, t?.value, [], {}, {}, l), [
87874
87874
  e,
87875
- d,
87875
+ f,
87876
87876
  t,
87877
- c
87878
- ]), w = h[m], T = z(() => ({
87879
- ...C,
87880
- viewport: w?.viewport ?? C.viewport,
87881
- nodes: C.nodes.map((e) => ({
87877
+ l
87878
+ ]), T = g[h], E = z(() => ({
87879
+ ...w,
87880
+ viewport: T?.viewport ?? w.viewport,
87881
+ nodes: w.nodes.map((e) => ({
87882
87882
  ...e,
87883
- position: w?.positions?.[e.id] ?? e.position
87883
+ position: T?.positions?.[e.id] ?? e.position
87884
87884
  }))
87885
- }), [C, w]), E = C.nodes.some((e) => {
87886
- let t = w?.positions?.[e.id];
87885
+ }), [w, T]), D = w.nodes.some((e) => {
87886
+ let t = T?.positions?.[e.id];
87887
87887
  return t != null && (t.x !== e.position.x || t.y !== e.position.y);
87888
- }), D = (e) => {
87889
- f(e), v([]), S(void 0);
87890
- }, O = _.length === 1 ? u.node(d, _[0]) : void 0, k = _.length === 1 ? T.nodes.find((e) => e.id === _[0] && e.kind === "comment") : void 0, A = (e) => {
87891
- v(e), b(!0);
87892
- };
87888
+ }), O = (e) => {
87889
+ m(e), y([]), C(void 0);
87890
+ }, k = v.length === 1 ? d.node(f, v[0]) : void 0, A = v.length === 1 ? E.nodes.find((e) => e.id === v[0] && e.kind === "comment") : void 0, j = (e) => {
87891
+ y(e), x(!0);
87892
+ }, M = f.kind === "subflow" || t == null || D ? /* @__PURE__ */ K(W, { children: [
87893
+ f.kind === "subflow" && /* @__PURE__ */ G(Y, {
87894
+ size: "xs",
87895
+ variant: "ghost",
87896
+ onClick: () => O({ kind: "flow" }),
87897
+ children: l("snapshot.root")
87898
+ }),
87899
+ f.kind === "subflow" && /* @__PURE__ */ G("span", {
87900
+ className: "truncate",
87901
+ children: d.subflow(f.id)?.name ?? f.id
87902
+ }),
87903
+ t == null && /* @__PURE__ */ G("span", {
87904
+ className: "revision-viewer-hint",
87905
+ children: l("snapshot.missingLayout")
87906
+ }),
87907
+ D && /* @__PURE__ */ K(Y, {
87908
+ className: "ml-auto",
87909
+ size: "xs",
87910
+ variant: "outline",
87911
+ onClick: () => _((e) => $9(e, h, { kind: "restore" })),
87912
+ children: [/* @__PURE__ */ G("i", {
87913
+ "aria-hidden": "true",
87914
+ className: "i-lucide-light:rotate-ccw"
87915
+ }), l("snapshot.restore")]
87916
+ })
87917
+ ] }) : void 0;
87893
87918
  return /* @__PURE__ */ K("section", {
87894
- ref: o,
87895
- className: `revision-viewer${y ? " inspector-open" : ""}`,
87896
- "aria-label": i ?? c("snapshot.title"),
87897
- children: [/* @__PURE__ */ K("header", {
87919
+ ref: c,
87920
+ className: `revision-viewer${b ? " inspector-open" : ""}`,
87921
+ "aria-label": i ?? l("snapshot.title"),
87922
+ children: [o && /* @__PURE__ */ K("header", {
87898
87923
  className: "revision-viewer-toolbar",
87899
- children: [
87900
- /* @__PURE__ */ K("span", {
87901
- className: "inline-flex items-center gap-1.5 font-medium",
87902
- children: [/* @__PURE__ */ G("i", {
87903
- "aria-hidden": "true",
87904
- className: "i-lucide-light:lock-keyhole"
87905
- }), i ?? c("snapshot.title")]
87906
- }),
87907
- d.kind === "subflow" && /* @__PURE__ */ G(Y, {
87908
- size: "xs",
87909
- variant: "ghost",
87910
- onClick: () => D({ kind: "flow" }),
87911
- children: c("snapshot.root")
87912
- }),
87913
- d.kind === "subflow" && /* @__PURE__ */ G("span", {
87914
- className: "truncate",
87915
- children: u.subflow(d.id)?.name ?? d.id
87916
- }),
87917
- t == null && /* @__PURE__ */ G("span", {
87918
- className: "revision-viewer-hint",
87919
- children: c("snapshot.missingLayout")
87920
- }),
87921
- E && /* @__PURE__ */ K(Y, {
87922
- className: "ml-auto",
87923
- size: "xs",
87924
- variant: "outline",
87925
- onClick: () => g((e) => $9(e, m, { kind: "restore" })),
87926
- children: [/* @__PURE__ */ G("i", {
87927
- "aria-hidden": "true",
87928
- className: "i-lucide-light:rotate-ccw"
87929
- }), c("snapshot.restore")]
87930
- })
87931
- ]
87924
+ children: [/* @__PURE__ */ K("span", {
87925
+ className: "inline-flex items-center gap-1.5 font-medium",
87926
+ children: [/* @__PURE__ */ G("i", {
87927
+ "aria-hidden": "true",
87928
+ className: "i-lucide-light:lock-keyhole"
87929
+ }), i ?? l("snapshot.title")]
87930
+ }), M]
87932
87931
  }), /* @__PURE__ */ K("div", {
87933
87932
  className: "revision-viewer-body",
87934
87933
  children: [/* @__PURE__ */ K("div", {
87935
87934
  className: "revision-viewer-canvas",
87936
87935
  children: [/* @__PURE__ */ G(sL, {
87937
- identity: m,
87938
- model: T,
87936
+ identity: h,
87937
+ model: E,
87939
87938
  editable: !1,
87940
87939
  nodesDraggable: !0,
87941
- fitView: w?.viewport == null,
87940
+ fitView: T?.viewport == null,
87942
87941
  className: a ? "open-flow-canvas-locked" : void 0,
87943
87942
  dark: n === "dark",
87944
- language: l,
87943
+ language: u,
87945
87944
  interactiveMode$: r,
87946
- selectedNodeIds: _,
87945
+ selectedNodeIds: v,
87947
87946
  ignoredNodeIds: [],
87948
- focusNodeRequest: x,
87949
- onMoveNodes: (e) => g((t) => $9(t, m, {
87947
+ focusNodeRequest: S,
87948
+ onMoveNodes: (e) => _((t) => $9(t, h, {
87950
87949
  kind: "move",
87951
87950
  positions: e
87952
87951
  })),
87953
- onMoveViewport: (e) => g((t) => $9(t, m, {
87952
+ onMoveViewport: (e) => _((t) => $9(t, h, {
87954
87953
  kind: "viewport",
87955
87954
  viewport: e
87956
87955
  })),
87957
- onSelectionChange: v,
87958
- onActivateSelection: A,
87959
- onInspectSelection: () => b(!0),
87960
- inspectorOpen: y,
87956
+ onSelectionChange: y,
87957
+ onActivateSelection: j,
87958
+ onInspectSelection: () => x(!0),
87959
+ inspectorOpen: b,
87960
+ toolbar: o ? void 0 : M,
87961
87961
  cornerTools: /* @__PURE__ */ G(lde, {
87962
- label: c("designer.toggleInspector"),
87963
- open: y,
87962
+ label: l("designer.toggleInspector"),
87963
+ open: b,
87964
87964
  disabled: !1,
87965
- onToggle: () => b((e) => !e)
87965
+ onToggle: () => x((e) => !e)
87966
87966
  })
87967
- }, m), T.nodes.length === 0 && /* @__PURE__ */ G("p", {
87967
+ }, h), E.nodes.length === 0 && /* @__PURE__ */ G("p", {
87968
87968
  className: "revision-viewer-empty",
87969
- children: c("inspector.emptyOutline")
87969
+ children: l("inspector.emptyOutline")
87970
87970
  })]
87971
- }), y && /* @__PURE__ */ G(P$, {
87972
- layoutRoot: o,
87971
+ }), b && /* @__PURE__ */ G(P$, {
87972
+ layoutRoot: c,
87973
87973
  className: "open-flow-property-panel",
87974
87974
  theme: n,
87975
- title: O?.node.name ?? k?.title ?? c("inspector.title"),
87976
- icon: sde(O, d),
87975
+ title: k?.node.name ?? A?.title ?? l("inspector.title"),
87976
+ icon: sde(k, f),
87977
87977
  focusOnOpen: !0,
87978
- onClose: () => b(!1),
87979
- children: O == null ? k?.kind === "comment" ? /* @__PURE__ */ G("div", {
87978
+ onClose: () => x(!1),
87979
+ children: k == null ? A?.kind === "comment" ? /* @__PURE__ */ G("div", {
87980
87980
  className: "inspector-content",
87981
87981
  children: /* @__PURE__ */ G(mO, { data: {
87982
- title: k.title,
87983
- content: k.content
87982
+ title: A.title,
87983
+ content: A.content
87984
87984
  } })
87985
87985
  }) : /* @__PURE__ */ G(R$, {
87986
- nodes: _.length > 1 ? T.nodes.filter((e) => _.includes(e.id)) : T.nodes,
87987
- onSelect: (e) => A([e]),
87986
+ nodes: v.length > 1 ? E.nodes.filter((e) => v.includes(e.id)) : E.nodes,
87987
+ onSelect: (e) => j([e]),
87988
87988
  onFocusNode: (e) => {
87989
- v([e]), S({
87989
+ y([e]), C({
87990
87990
  nodeId: e,
87991
- requestId: (x?.requestId ?? 0) + 1
87991
+ requestId: (S?.requestId ?? 0) + 1
87992
87992
  });
87993
87993
  }
87994
87994
  }) : /* @__PURE__ */ G(cde, {
87995
87995
  readOnly: !0,
87996
- revision: u,
87997
- selection: O,
87998
- target: d,
87996
+ revision: d,
87997
+ selection: k,
87998
+ target: f,
87999
87999
  theme: n,
88000
- onOpenSubflow: (e) => D({
88000
+ onOpenSubflow: (e) => O({
88001
88001
  kind: "subflow",
88002
88002
  id: e
88003
88003
  })
88004
- }, `${m}:${O.id}`)
88004
+ }, `${h}:${k.id}`)
88005
88005
  })]
88006
88006
  })]
88007
88007
  });
@@ -88024,7 +88024,8 @@ function dde({ draft: e, presentation: t, language: n, theme: r, label: i, class
88024
88024
  presentation: t,
88025
88025
  theme: r,
88026
88026
  label: i,
88027
- striped: !1
88027
+ striped: !1,
88028
+ showHeader: !1
88028
88029
  })
88029
88030
  })
88030
88031
  }) })