@plitzi/sdk-dev-tools 0.32.15 → 0.32.16

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @plitzi/sdk-dev-tools
2
2
 
3
+ ## 0.32.16
4
+
5
+ ### Patch Changes
6
+
7
+ - v0.32.16
8
+ - Updated dependencies
9
+ - @plitzi/sdk-navigation@0.32.16
10
+ - @plitzi/sdk-schema@0.32.16
11
+ - @plitzi/sdk-shared@0.32.16
12
+ - @plitzi/sdk-style@0.32.16
13
+
3
14
  ## 0.32.15
4
15
 
5
16
  ### Patch Changes
@@ -19,26 +19,28 @@ var l = ({ children: l }) => {
19
19
  })), []), _ = e((e) => p((t) => o(t, [e])), []), v = e((e, ...t) => {
20
20
  if (!(!e || typeof f[e] != "function")) return f[e](...t);
21
21
  }, [f]), y = e(() => d([]), []);
22
- return m.current ||= (c.setCallback(h), c.setCallbackAddProvider(g), c.setCallbackRemoveProvider(_), !0), t(() => (c.setCallback(h), c.setCallbackAddProvider(g), c.setCallbackRemoveProvider(_), c.processPendingLogs(), () => {
22
+ m.current ||= (c.setCallback(h), c.setCallbackAddProvider(g), c.setCallbackRemoveProvider(_), !0), t(() => (c.setCallback(h), c.setCallbackAddProvider(g), c.setCallbackRemoveProvider(_), c.processPendingLogs(), () => {
23
23
  c.setCallback(void 0), c.setCallbackAddProvider(void 0), c.setCallbackRemoveProvider(void 0), c.flush();
24
24
  }), [
25
25
  h,
26
26
  g,
27
27
  _
28
- ]), /* @__PURE__ */ s(a, {
29
- value: n(() => ({
30
- providers: f,
31
- logs: u,
32
- setLogs: d,
33
- clearLogs: y,
34
- getData: v
35
- }), [
36
- f,
37
- u,
38
- d,
39
- y,
40
- v
41
- ]),
28
+ ]);
29
+ let b = n(() => ({
30
+ providers: f,
31
+ logs: u,
32
+ setLogs: d,
33
+ clearLogs: y,
34
+ getData: v
35
+ }), [
36
+ f,
37
+ u,
38
+ d,
39
+ y,
40
+ v
41
+ ]);
42
+ return /* @__PURE__ */ s(a, {
43
+ value: b,
42
44
  children: l
43
45
  });
44
46
  };
@@ -4,27 +4,27 @@ import { get as r } from "@plitzi/plitzi-ui/helpers";
4
4
  import { jsx as i } from "react/jsx-runtime";
5
5
  //#region src/components/DevToolsPanel/tabs/ElementsViewer/DetailsValue.tsx
6
6
  var a = ({ attribute: a, value: o, isDefinition: s = !1, onSelectElement: c }) => {
7
- let [l] = n("schema.flat"), u = e((e) => () => c?.(e), [c]);
7
+ let [l] = n("schema.flat"), u = e((e) => () => c?.(e), [c]), d = t(() => a === "items" && s && Array.isArray(o) ? /* @__PURE__ */ i("div", {
8
+ className: "flex flex-col",
9
+ children: o.map((e, t) => /* @__PURE__ */ i("div", {
10
+ className: "cursor-pointer text-purple-400",
11
+ onClick: u(e),
12
+ children: r(l, `${e}.definition.label`, e)
13
+ }, t))
14
+ }) : a && ["rootId", "parentId"].includes(a) && s ? /* @__PURE__ */ i("div", {
15
+ className: "cursor-pointer text-purple-400",
16
+ onClick: u(o),
17
+ children: r(l, `${o}.definition.label`, o)
18
+ }) : a === "styleSelectors" && s && o && typeof o == "object" ? Object.values(o).join(", ") : typeof o == "object" && o ? JSON.stringify(o) : typeof o == "boolean" ? o ? "True" : "False" : o, [
19
+ a,
20
+ s,
21
+ o,
22
+ u,
23
+ l
24
+ ]);
8
25
  return /* @__PURE__ */ i("div", {
9
26
  className: "grow basis-0 truncate",
10
- children: t(() => a === "items" && s && Array.isArray(o) ? /* @__PURE__ */ i("div", {
11
- className: "flex flex-col",
12
- children: o.map((e, t) => /* @__PURE__ */ i("div", {
13
- className: "cursor-pointer text-purple-400",
14
- onClick: u(e),
15
- children: r(l, `${e}.definition.label`, e)
16
- }, t))
17
- }) : a && ["rootId", "parentId"].includes(a) && s ? /* @__PURE__ */ i("div", {
18
- className: "cursor-pointer text-purple-400",
19
- onClick: u(o),
20
- children: r(l, `${o}.definition.label`, o)
21
- }) : a === "styleSelectors" && s && o && typeof o == "object" ? Object.values(o).join(", ") : typeof o == "object" && o ? JSON.stringify(o) : typeof o == "boolean" ? o ? "True" : "False" : o, [
22
- a,
23
- s,
24
- o,
25
- u,
26
- l
27
- ])
27
+ children: d
28
28
  });
29
29
  };
30
30
  //#endregion
@@ -5,14 +5,14 @@ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
5
  import s from "@plitzi/plitzi-ui/Input";
6
6
  //#region src/components/DevToolsPanel/tabs/ElementsViewer/ElementsList.tsx
7
7
  var c = ({ elements: c, elementSelected: l, onSelect: u }) => {
8
- let [d, f] = r(""), p = n(() => (c ?? []).filter((e) => e.definition.label.toLowerCase().includes(d.toLowerCase())), [c, d]);
8
+ let [d, f] = r(""), p = n(() => (c ?? []).filter((e) => e.definition.label.toLowerCase().includes(d.toLowerCase())), [c, d]), m = t((e) => f(e), []);
9
9
  return /* @__PURE__ */ o("div", {
10
10
  className: "flex h-full w-[280px] shrink-0 flex-col gap-2 border-r border-zinc-200 dark:border-zinc-700",
11
11
  children: [/* @__PURE__ */ a("div", {
12
12
  className: "px-2 pt-2",
13
13
  children: /* @__PURE__ */ a(s, {
14
14
  value: d,
15
- onChange: t((e) => f(e), []),
15
+ onChange: m,
16
16
  placeholder: "Search elements...",
17
17
  size: "sm"
18
18
  })
@@ -57,7 +57,7 @@ var b = () => {
57
57
  let t = V + e;
58
58
  t >= 0 && t < z.length && (P(z[t].commitId), I(void 0));
59
59
  }, [z, V]), Z = u((e) => {
60
- e.key !== "ArrowLeft" && e.key !== "ArrowRight" || (e.preventDefault(), X(e.key === "ArrowLeft" ? -1 : 1));
60
+ (e.key === "ArrowLeft" || e.key === "ArrowRight") && (e.preventDefault(), X(e.key === "ArrowLeft" ? -1 : 1));
61
61
  }, [X]);
62
62
  return b ? H ? /* @__PURE__ */ v("div", {
63
63
  className: "flex h-full min-h-0 w-full flex-col",
@@ -9,7 +9,16 @@ var p = 6, m = ({ commits: m, selectedIndex: h, hydrated: g, onSelect: _ }) => {
9
9
  block: "nearest",
10
10
  inline: "nearest"
11
11
  }), [h]);
12
- let x = s((e) => () => _(e), [_]);
12
+ let x = s((e) => () => _(e), [_]), S = s((e) => {
13
+ if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
14
+ e.preventDefault(), e.stopPropagation();
15
+ let t = h + (e.key === "ArrowLeft" ? -1 : 1);
16
+ t >= 0 && t < m.length && _(m[t].commitId);
17
+ }, [
18
+ m,
19
+ h,
20
+ _
21
+ ]);
13
22
  return /* @__PURE__ */ f("div", {
14
23
  className: "flex shrink-0 flex-col border-b border-zinc-200 bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900",
15
24
  children: [/* @__PURE__ */ d("div", {
@@ -17,16 +26,7 @@ var p = 6, m = ({ commits: m, selectedIndex: h, hydrated: g, onSelect: _ }) => {
17
26
  "aria-label": "Commits, total render time",
18
27
  "aria-orientation": "horizontal",
19
28
  tabIndex: 0,
20
- onKeyDown: s((e) => {
21
- if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
22
- e.preventDefault(), e.stopPropagation();
23
- let t = h + (e.key === "ArrowLeft" ? -1 : 1);
24
- t >= 0 && t < m.length && _(m[t].commitId);
25
- }, [
26
- m,
27
- h,
28
- _
29
- ]),
29
+ onKeyDown: S,
30
30
  className: "flex h-20 items-end gap-1 overflow-x-auto px-2 pt-2 outline-none focus-visible:ring-1 focus-visible:ring-violet-400",
31
31
  children: m.map((n, s) => {
32
32
  let c = s === h, l = n.commitId === 0, u = l ? 100 : Math.max(6, Math.round(n.duration / y * 100)), m = r(n, g, n.commitId === b), _ = n.causes.slice(0, p).map((e) => e.path).join(", "), S = n.causes.length > p ? ` +${n.causes.length - p}` : "", C = n.causes.length > 0 ? `\nCaused by ${_}${S}` : "";
@@ -4,7 +4,9 @@ import { useCallback as n } from "react";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  //#region src/components/DevToolsPanel/tabs/TracingViewer/components/SidebarShell/SidebarShell.tsx
6
6
  var i = 180, a = 480, o = 224, s = ({ children: s }) => {
7
- let [c, l] = t("plitzi-sdk.dev-tools.tracing.sidebar-width", o);
7
+ let [c, l] = t("plitzi-sdk.dev-tools.tracing.sidebar-width", o), u = n((e) => {
8
+ Number.isFinite(e) && l(e);
9
+ }, [l]);
8
10
  return /* @__PURE__ */ r(e, {
9
11
  className: "shrink-0 border-l border-zinc-200 dark:border-zinc-800",
10
12
  resizeHandles: ["w"],
@@ -13,9 +15,7 @@ var i = 180, a = 480, o = 224, s = ({ children: s }) => {
13
15
  width: c,
14
16
  minConstraintsX: i,
15
17
  maxConstraintsX: a,
16
- onChange: n((e) => {
17
- Number.isFinite(e) && l(e);
18
- }, [l]),
18
+ onChange: u,
19
19
  children: /* @__PURE__ */ r("aside", {
20
20
  className: "flex h-full w-full flex-col gap-1.5 overflow-auto bg-zinc-50 px-3 py-2 text-[10px] dark:bg-zinc-900/50",
21
21
  children: s
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-dev-tools",
3
- "version": "0.32.15",
3
+ "version": "0.32.16",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist"
@@ -572,19 +572,19 @@
572
572
  "react": "^19.2.8",
573
573
  "react-dom": "^19.2.8",
574
574
  "typescript": "^6.0.3",
575
- "vite": "^8.1.5"
575
+ "vite": "^8.2.0"
576
576
  },
577
577
  "peerDependencies": {
578
578
  "react": "^19",
579
579
  "react-dom": "^19"
580
580
  },
581
581
  "dependencies": {
582
- "@plitzi/nexus": "0.32.15",
582
+ "@plitzi/nexus": "^1.0.0",
583
583
  "@plitzi/plitzi-ui": "^1.6.18",
584
- "@plitzi/sdk-navigation": "0.32.15",
585
- "@plitzi/sdk-schema": "0.32.15",
586
- "@plitzi/sdk-shared": "0.32.15",
587
- "@plitzi/sdk-style": "0.32.15",
584
+ "@plitzi/sdk-navigation": "0.32.16",
585
+ "@plitzi/sdk-schema": "0.32.16",
586
+ "@plitzi/sdk-shared": "0.32.16",
587
+ "@plitzi/sdk-style": "0.32.16",
588
588
  "@uiw/react-json-view": "^2.0.0-alpha.43",
589
589
  "clsx": "^2.1.1"
590
590
  }