@republicroad/seal-editor 1.4.0 → 1.4.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.
package/README.md CHANGED
@@ -35,7 +35,7 @@ import '@republicroad/seal-editor/dist/style.css';
35
35
  </JdmConfigProvider>;
36
36
  ```
37
37
 
38
- Wrap any subtree in `.grl-root` to scope the theme island; multiple islands
38
+ Wrap any subtree in `.seal-root` to scope the theme island; multiple islands
39
39
  can coexist with independent themes.
40
40
 
41
41
  ## What's inside
package/dist/index.d.ts CHANGED
@@ -598,6 +598,7 @@ export declare const decisionModelSchema: z.ZodObject<{
598
598
  id: z.ZodDefault<z.ZodString>;
599
599
  condition: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
600
600
  isDefault: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
601
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
601
602
  }, z.core.$strip>>;
602
603
  }, z.core.$strip>;
603
604
  id: z.ZodDefault<z.ZodString>;
@@ -1805,6 +1806,7 @@ export declare const nodeSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<[z.ZodObjec
1805
1806
  id: z.ZodDefault<z.ZodString>;
1806
1807
  condition: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
1807
1808
  isDefault: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
1809
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
1808
1810
  }, z.core.$strip>>;
1809
1811
  }, z.core.$strip>;
1810
1812
  id: z.ZodDefault<z.ZodString>;
@@ -2241,6 +2243,7 @@ export declare const switchNodeSchema: z.ZodObject<{
2241
2243
  id: z.ZodDefault<z.ZodString>;
2242
2244
  condition: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
2243
2245
  isDefault: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
2246
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
2244
2247
  }, z.core.$strip>>;
2245
2248
  }, z.core.$strip>;
2246
2249
  id: z.ZodDefault<z.ZodString>;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, U as g, V as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as ee, n as te, o as ne, p as A, r as re, s as j, t as ie, u as ae, v as oe, w as se, x as ce, y as le, z as ue } from "./schema-BmbNWz7t.js";
1
+ import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, U as g, V as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as ee, n as te, o as ne, p as A, r as re, s as j, t as ie, u as ae, v as oe, w as se, x as ce, y as le, z as ue } from "./schema-DPocF3WI.js";
2
2
  import { DndContext as de, DragOverlay as fe, KeyboardSensor as pe, MeasuringStrategy as me, PointerSensor as he, closestCenter as ge, useDndContext as _e, useDraggable as ve, useDroppable as ye, useSensor as be, useSensors as xe } from "@dnd-kit/core";
3
3
  import * as M from "react";
4
4
  import N, { Fragment as Se, Suspense as Ce, createContext as we, createRef as Te, forwardRef as Ee, memo as De, useCallback as P, useContext as Oe, useEffect as F, useImperativeHandle as ke, useLayoutEffect as Ae, useMemo as I, useRef as L, useState as R, useTransition as je } from "react";
@@ -8523,7 +8523,7 @@ var wd = ({ className: e, ...t }) => /* @__PURE__ */ z("div", {
8523
8523
  children: r
8524
8524
  }),
8525
8525
  i.length > 0 && /* @__PURE__ */ z("div", {
8526
- className: H("nodrag bg-[var(--grl-color-primary-bg-fade)] overflow-hidden", "rounded-b-[var(--node-border-radius)] border-t border-t-[var(--grl-color-border-fade)]"),
8526
+ className: H("nodrag bg-[var(--seal-color-primary-bg-fade)] overflow-hidden", "rounded-b-[var(--node-border-radius)] border-t border-t-[var(--seal-color-border-fade)]"),
8527
8527
  children: /* @__PURE__ */ z("div", {
8528
8528
  className: "flex [&_button]:py-0.5 [&_button]:px-2 [&_button]:text-xs [&_button]:h-auto [&_button]:rounded-none [&_button]:text-[var(--muted-foreground)]",
8529
8529
  children: i
@@ -8531,7 +8531,7 @@ var wd = ({ className: e, ...t }) => /* @__PURE__ */ z("div", {
8531
8531
  }),
8532
8532
  (f || p) && /* @__PURE__ */ B("div", {
8533
8533
  "data-slot": "node-run-strip",
8534
- className: "nodrag flex items-center justify-between gap-2 px-2 py-0.5 text-[10px] font-medium border-t border-t-[var(--grl-color-border-fade)] bg-[var(--grl-color-primary-bg-fade)] text-[var(--muted-foreground)]",
8534
+ className: "nodrag flex items-center justify-between gap-2 px-2 py-0.5 text-[10px] font-medium border-t border-t-[var(--seal-color-border-fade)] bg-[var(--seal-color-primary-bg-fade)] text-[var(--muted-foreground)]",
8535
8535
  children: [/* @__PURE__ */ z("span", { children: "TRACE" }), /* @__PURE__ */ B("span", {
8536
8536
  className: "flex min-w-0 items-center gap-1.5",
8537
8537
  children: [p && /* @__PURE__ */ z("span", {
@@ -12346,59 +12346,55 @@ var sp = op({
12346
12346
  type: "edge"
12347
12347
  }]), t.removeEdges([n]));
12348
12348
  };
12349
- return /* @__PURE__ */ B(Me, { children: [
12350
- O,
12351
- /* @__PURE__ */ z(ir, {
12352
- path: T,
12353
- markerEnd: m,
12354
- style: {
12355
- ...p || {},
12356
- stroke: G(x).with({ status: "added" }, () => "var(--seal-color-success)").with({ status: "removed" }, () => "var(--destructive)").otherwise(() => void 0)
12357
- }
12358
- }),
12359
- /* @__PURE__ */ z(sr, { children: /* @__PURE__ */ B("div", {
12360
- className: "nodrag nopan absolute z-[1000] flex items-center justify-center gap-1 text-xs pointer-events-auto",
12361
- style: { transform: `translate(-50%, -50%) translate(${E}px,${D}px)` },
12362
- children: [
12363
- !_ && S && /* @__PURE__ */ B(Me, { children: [/* @__PURE__ */ z("div", {
12364
- className: "fixed inset-0 -z-10",
12365
- onClick: () => C(!1)
12366
- }), /* @__PURE__ */ z("div", {
12367
- className: "absolute bottom-full mb-1 max-h-44 w-48 overflow-y-auto rounded-md border border-[var(--border)] bg-[var(--seal-color-bg-container)] p-1 shadow-md",
12368
- "data-slot": "edge-node-picker",
12369
- children: w.map((e) => /* @__PURE__ */ B("button", {
12370
- type: "button",
12371
- className: "flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left text-xs hover:bg-[var(--accent)]",
12372
- onClick: () => void k(e),
12373
- children: [/* @__PURE__ */ z("span", {
12374
- className: "flex h-4 w-4 items-center justify-center",
12375
- children: e.icon
12376
- }), /* @__PURE__ */ z("span", {
12377
- className: "truncate",
12378
- children: e.label
12379
- })]
12380
- }, `${e.type}:${e.component ?? ""}`))
12381
- })] }),
12382
- !_ && /* @__PURE__ */ z(J, {
12383
- type: "primary",
12384
- shape: "round",
12385
- icon: /* @__PURE__ */ z(Pt, {}),
12386
- className: "seal-edge-add-button",
12387
- "data-visible": g || S,
12388
- onClick: () => C((e) => !e)
12389
- }),
12390
- !_ && /* @__PURE__ */ z(J, {
12391
- type: "primary",
12392
- shape: "round",
12393
- icon: /* @__PURE__ */ z(xs, {}),
12394
- danger: !0,
12395
- className: H("seal-edge-delete-button"),
12396
- "data-visible": g && !S,
12397
- onClick: () => t.removeEdges([n])
12398
- })
12399
- ]
12400
- }) })
12401
- ] });
12349
+ return /* @__PURE__ */ B(Me, { children: [/* @__PURE__ */ z(ir, {
12350
+ path: T,
12351
+ markerEnd: m,
12352
+ style: {
12353
+ ...p || {},
12354
+ stroke: G(x).with({ status: "added" }, () => "var(--seal-color-success)").with({ status: "removed" }, () => "var(--destructive)").otherwise(() => void 0)
12355
+ }
12356
+ }), /* @__PURE__ */ B(sr, { children: [O, /* @__PURE__ */ B("div", {
12357
+ className: "nodrag nopan absolute z-[1000] flex items-center justify-center gap-1 text-xs pointer-events-auto",
12358
+ style: { transform: `translate(-50%, -50%) translate(${E}px,${D}px)` },
12359
+ children: [
12360
+ !_ && S && /* @__PURE__ */ B(Me, { children: [/* @__PURE__ */ z("div", {
12361
+ className: "fixed inset-0 -z-10",
12362
+ onClick: () => C(!1)
12363
+ }), /* @__PURE__ */ z("div", {
12364
+ className: "absolute bottom-full mb-1 max-h-44 w-48 overflow-y-auto rounded-md border border-[var(--border)] bg-[var(--seal-color-bg-container)] p-1 shadow-md",
12365
+ "data-slot": "edge-node-picker",
12366
+ children: w.map((e) => /* @__PURE__ */ B("button", {
12367
+ type: "button",
12368
+ className: "flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left text-xs hover:bg-[var(--accent)]",
12369
+ onClick: () => void k(e),
12370
+ children: [/* @__PURE__ */ z("span", {
12371
+ className: "flex h-4 w-4 items-center justify-center",
12372
+ children: e.icon
12373
+ }), /* @__PURE__ */ z("span", {
12374
+ className: "truncate",
12375
+ children: e.label
12376
+ })]
12377
+ }, `${e.type}:${e.component ?? ""}`))
12378
+ })] }),
12379
+ !_ && /* @__PURE__ */ z(J, {
12380
+ type: "primary",
12381
+ shape: "round",
12382
+ icon: /* @__PURE__ */ z(Pt, {}),
12383
+ className: "seal-edge-add-button",
12384
+ "data-visible": g || S,
12385
+ onClick: () => C((e) => !e)
12386
+ }),
12387
+ !_ && /* @__PURE__ */ z(J, {
12388
+ type: "primary",
12389
+ shape: "round",
12390
+ icon: /* @__PURE__ */ z(xs, {}),
12391
+ danger: !0,
12392
+ className: H("seal-edge-delete-button"),
12393
+ "data-visible": g && !S,
12394
+ onClick: () => t.removeEdges([n])
12395
+ })
12396
+ ]
12397
+ })] })] });
12402
12398
  }, vp = (e) => (t) => /* @__PURE__ */ z(_p, {
12403
12399
  ...t,
12404
12400
  ...e