jazz-tools 0.18.36 → 0.18.38

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.
Files changed (32) hide show
  1. package/.turbo/turbo-build.log +55 -55
  2. package/CHANGELOG.md +24 -0
  3. package/dist/inspector/{custom-element-RBBL46TI.js → custom-element-QESCMFY7.js} +492 -409
  4. package/dist/inspector/custom-element-QESCMFY7.js.map +1 -0
  5. package/dist/inspector/index.js +459 -376
  6. package/dist/inspector/index.js.map +1 -1
  7. package/dist/inspector/register-custom-element.js +1 -1
  8. package/dist/inspector/ui/accordion.d.ts +8 -0
  9. package/dist/inspector/ui/accordion.d.ts.map +1 -0
  10. package/dist/inspector/ui/error-boundary.d.ts +19 -0
  11. package/dist/inspector/ui/error-boundary.d.ts.map +1 -0
  12. package/dist/inspector/ui/index.d.ts +1 -0
  13. package/dist/inspector/ui/index.d.ts.map +1 -1
  14. package/dist/inspector/ui/text.d.ts +1 -0
  15. package/dist/inspector/ui/text.d.ts.map +1 -1
  16. package/dist/inspector/viewer/history-view.d.ts.map +1 -1
  17. package/dist/inspector/viewer/page-stack.d.ts.map +1 -1
  18. package/dist/inspector/viewer/raw-data-card.d.ts.map +1 -1
  19. package/dist/tools/exports.d.ts +1 -1
  20. package/dist/tools/exports.d.ts.map +1 -1
  21. package/package.json +4 -4
  22. package/src/inspector/tests/viewer/history-view.test.tsx +114 -12
  23. package/src/inspector/ui/accordion.tsx +52 -0
  24. package/src/inspector/ui/error-boundary.tsx +51 -0
  25. package/src/inspector/ui/index.ts +1 -0
  26. package/src/inspector/ui/text.tsx +1 -0
  27. package/src/inspector/viewer/history-view.tsx +18 -11
  28. package/src/inspector/viewer/page-stack.tsx +11 -8
  29. package/src/inspector/viewer/raw-data-card.tsx +11 -11
  30. package/src/inspector/viewer/use-resolve-covalue.ts +2 -2
  31. package/src/tools/exports.ts +1 -0
  32. package/dist/inspector/custom-element-RBBL46TI.js.map +0 -1
@@ -1970,7 +1970,7 @@ var require_scheduler = __commonJS({
1970
1970
  var require_react_dom_production = __commonJS({
1971
1971
  "../../node_modules/react-dom/cjs/react-dom.production.js"(exports) {
1972
1972
  "use strict";
1973
- var React8 = require_react();
1973
+ var React9 = require_react();
1974
1974
  function formatProdErrorMessage(code) {
1975
1975
  var url = "https://react.dev/errors/" + code;
1976
1976
  if (1 < arguments.length) {
@@ -2010,7 +2010,7 @@ var require_react_dom_production = __commonJS({
2010
2010
  implementation
2011
2011
  };
2012
2012
  }
2013
- var ReactSharedInternals = React8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
2013
+ var ReactSharedInternals = React9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
2014
2014
  function getCrossOriginStringAs(as, input) {
2015
2015
  if ("font" === as) return "";
2016
2016
  if ("string" === typeof input)
@@ -2164,7 +2164,7 @@ var require_react_dom_development = __commonJS({
2164
2164
  return dispatcher;
2165
2165
  }
2166
2166
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
2167
- var React8 = require_react(), Internals = {
2167
+ var React9 = require_react(), Internals = {
2168
2168
  d: {
2169
2169
  f: noop,
2170
2170
  r: function() {
@@ -2182,7 +2182,7 @@ var require_react_dom_development = __commonJS({
2182
2182
  },
2183
2183
  p: 0,
2184
2184
  findDOMNode: null
2185
- }, REACT_PORTAL_TYPE = Symbol.for("react.portal"), ReactSharedInternals = React8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
2185
+ }, REACT_PORTAL_TYPE = Symbol.for("react.portal"), ReactSharedInternals = React9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
2186
2186
  "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
2187
2187
  "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
2188
2188
  );
@@ -2390,7 +2390,7 @@ var require_react_dom_client_production = __commonJS({
2390
2390
  "../../node_modules/react-dom/cjs/react-dom-client.production.js"(exports) {
2391
2391
  "use strict";
2392
2392
  var Scheduler = require_scheduler();
2393
- var React8 = require_react();
2393
+ var React9 = require_react();
2394
2394
  var ReactDOM = require_react_dom();
2395
2395
  function formatProdErrorMessage(code) {
2396
2396
  var url = "https://react.dev/errors/" + code;
@@ -2578,7 +2578,7 @@ var require_react_dom_client_production = __commonJS({
2578
2578
  return null;
2579
2579
  }
2580
2580
  var isArrayImpl = Array.isArray;
2581
- var ReactSharedInternals = React8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
2581
+ var ReactSharedInternals = React9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
2582
2582
  var ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
2583
2583
  var sharedNotPendingObject = {
2584
2584
  pending: false,
@@ -13570,7 +13570,7 @@ var require_react_dom_client_production = __commonJS({
13570
13570
  0 === i && attemptExplicitHydrationTarget(target);
13571
13571
  }
13572
13572
  };
13573
- var isomorphicReactPackageVersion$jscomp$inline_1785 = React8.version;
13573
+ var isomorphicReactPackageVersion$jscomp$inline_1785 = React9.version;
13574
13574
  if ("19.1.0" !== isomorphicReactPackageVersion$jscomp$inline_1785)
13575
13575
  throw Error(
13576
13576
  formatProdErrorMessage(
@@ -15021,7 +15021,7 @@ var require_react_dom_client_development = __commonJS({
15021
15021
  "number" === type && getActiveElement(node.ownerDocument) === node || node.defaultValue === "" + value || (node.defaultValue = "" + value);
15022
15022
  }
15023
15023
  function validateOptionProps(element, props) {
15024
- null == props.value && ("object" === typeof props.children && null !== props.children ? React8.Children.forEach(props.children, function(child) {
15024
+ null == props.value && ("object" === typeof props.children && null !== props.children ? React9.Children.forEach(props.children, function(child) {
15025
15025
  null == child || "string" === typeof child || "number" === typeof child || "bigint" === typeof child || didWarnInvalidChild || (didWarnInvalidChild = true, console.error(
15026
15026
  "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."
15027
15027
  ));
@@ -28603,14 +28603,14 @@ var require_react_dom_client_development = __commonJS({
28603
28603
  ));
28604
28604
  }
28605
28605
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
28606
- var Scheduler = require_scheduler(), React8 = require_react(), ReactDOM = require_react_dom(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy");
28606
+ var Scheduler = require_scheduler(), React9 = require_react(), ReactDOM = require_react_dom(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy");
28607
28607
  Symbol.for("react.scope");
28608
28608
  var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
28609
28609
  Symbol.for("react.legacy_hidden");
28610
28610
  Symbol.for("react.tracing_marker");
28611
28611
  var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
28612
28612
  Symbol.for("react.view_transition");
28613
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, NotPending = Object.freeze({
28613
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, NotPending = Object.freeze({
28614
28614
  pending: false,
28615
28615
  data: null,
28616
28616
  method: null,
@@ -31324,7 +31324,7 @@ var require_react_dom_client_development = __commonJS({
31324
31324
  }
31325
31325
  };
31326
31326
  (function() {
31327
- var isomorphicReactPackageVersion = React8.version;
31327
+ var isomorphicReactPackageVersion = React9.version;
31328
31328
  if ("19.1.0" !== isomorphicReactPackageVersion)
31329
31329
  throw Error(
31330
31330
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.1.0\nLearn more: https://react.dev/warnings/version-mismatch")
@@ -31720,20 +31720,20 @@ var require_react_jsx_runtime_development = __commonJS({
31720
31720
  function validateChildKeys(node) {
31721
31721
  "object" === typeof node && null !== node && node.$$typeof === REACT_ELEMENT_TYPE && node._store && (node._store.validated = 1);
31722
31722
  }
31723
- var React8 = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
31723
+ var React9 = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
31724
31724
  Symbol.for("react.provider");
31725
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
31725
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
31726
31726
  return null;
31727
31727
  };
31728
- React8 = {
31728
+ React9 = {
31729
31729
  "react-stack-bottom-frame": function(callStackForError) {
31730
31730
  return callStackForError();
31731
31731
  }
31732
31732
  };
31733
31733
  var specialPropKeyWarningShown;
31734
31734
  var didWarnAboutElementRef = {};
31735
- var unknownOwnerDebugStack = React8["react-stack-bottom-frame"].bind(
31736
- React8,
31735
+ var unknownOwnerDebugStack = React9["react-stack-bottom-frame"].bind(
31736
+ React9,
31737
31737
  UnknownOwner
31738
31738
  )();
31739
31739
  var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
@@ -31782,14 +31782,14 @@ var require_jsx_runtime = __commonJS({
31782
31782
  });
31783
31783
 
31784
31784
  // src/inspector/custom-element.tsx
31785
- var import_react22 = __toESM(require_react(), 1);
31785
+ var import_react24 = __toESM(require_react(), 1);
31786
31786
  var import_client = __toESM(require_client(), 1);
31787
31787
  import { setup } from "goober";
31788
31788
  import { Account } from "jazz-tools";
31789
31789
 
31790
31790
  // src/inspector/viewer/new-app.tsx
31791
- var import_react21 = __toESM(require_react(), 1);
31792
- import { styled as styled21 } from "goober";
31791
+ var import_react23 = __toESM(require_react(), 1);
31792
+ import { styled as styled23 } from "goober";
31793
31793
 
31794
31794
  // src/inspector/ui/button.tsx
31795
31795
  var import_react = __toESM(require_react(), 1);
@@ -31964,11 +31964,11 @@ var Breadcrumbs = ({
31964
31964
  };
31965
31965
 
31966
31966
  // src/inspector/viewer/page-stack.tsx
31967
- import { styled as styled18 } from "goober";
31967
+ import { styled as styled20 } from "goober";
31968
31968
 
31969
31969
  // src/inspector/viewer/page.tsx
31970
- var import_react17 = __toESM(require_react(), 1);
31971
- import { styled as styled17 } from "goober";
31970
+ var import_react18 = __toESM(require_react(), 1);
31971
+ import { styled as styled18 } from "goober";
31972
31972
 
31973
31973
  // src/inspector/ui/badge.tsx
31974
31974
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
@@ -32340,7 +32340,7 @@ async function resolveCoValue(coValueId, node) {
32340
32340
  extendedType = "image";
32341
32341
  } else if (isAccount(snapshot)) {
32342
32342
  extendedType = "account";
32343
- } else if (isGroup(snapshot)) {
32343
+ } else if (value.core.isGroup()) {
32344
32344
  extendedType = "group";
32345
32345
  }
32346
32346
  }
@@ -32369,7 +32369,7 @@ function subscribeToCoValue(coValueId, node, callback) {
32369
32369
  extendedType = "image";
32370
32370
  } else if (isAccount(snapshot)) {
32371
32371
  extendedType = "account";
32372
- } else if (isGroup(snapshot)) {
32372
+ } else if (value.core.isGroup()) {
32373
32373
  extendedType = "group";
32374
32374
  }
32375
32375
  } else if (type === "costream") {
@@ -32986,125 +32986,13 @@ function GridView({
32986
32986
  }
32987
32987
 
32988
32988
  // src/inspector/viewer/raw-data-card.tsx
32989
- var import_react9 = __toESM(require_react(), 1);
32990
- var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
32991
- function CopyButton({ data }) {
32992
- const [copyCount, setCopyCount] = (0, import_react9.useState)(0);
32993
- const copied = copyCount > 0;
32994
- const stringifiedData = JSON.stringify(data);
32995
- (0, import_react9.useEffect)(() => {
32996
- if (copyCount > 0) {
32997
- const timeout = setTimeout(() => setCopyCount(0), 1e3);
32998
- return () => {
32999
- clearTimeout(timeout);
33000
- };
33001
- }
33002
- }, [copyCount]);
33003
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
33004
- Button,
33005
- {
33006
- style: {
33007
- position: "absolute",
33008
- top: "10px",
33009
- right: "10px"
33010
- },
33011
- onClick: () => {
33012
- window.navigator.clipboard.writeText(stringifiedData).then(() => {
33013
- setCopyCount((count) => count + 1);
33014
- });
33015
- },
33016
- variant: "secondary",
33017
- children: copied ? "Copied" : "Copy"
33018
- }
33019
- );
33020
- }
33021
- function RawDataCard({ data }) {
33022
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Card, { style: { position: "relative" }, children: [
33023
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(CardHeader, { children: [
33024
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { strong: true, children: "Raw data" }),
33025
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CopyButton, { data })
33026
- ] }),
33027
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CardBody, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ValueRenderer, { json: data }) })
33028
- ] });
33029
- }
33030
-
33031
- // src/inspector/viewer/account-view.tsx
33032
- var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
33033
- function AccountView({
33034
- data,
33035
- onNavigate,
33036
- node
33037
- }) {
33038
- const readableData = { ...data };
33039
- for (const key in readableData) {
33040
- if (key === "readKey" || key.startsWith("sealer_z") || key.startsWith("key_z")) {
33041
- delete readableData[key];
33042
- }
33043
- }
33044
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
33045
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GridView, { data: readableData, onNavigate, node }),
33046
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RawDataCard, { data })
33047
- ] });
33048
- }
33049
-
33050
- // src/inspector/viewer/co-plain-text-view.tsx
33051
- var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
33052
- function CoPlainTextView({ data }) {
33053
- if (!data) return;
33054
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
33055
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: Object.values(data).join("") }),
33056
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(RawDataCard, { data })
33057
- ] });
33058
- }
33059
-
33060
- // src/inspector/viewer/group-view.tsx
33061
32989
  var import_react14 = __toESM(require_react(), 1);
33062
32990
 
33063
- // src/inspector/ui/table.tsx
33064
- var import_react10 = __toESM(require_react(), 1);
33065
- var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
33066
- import { styled as styled12 } from "goober";
33067
- var StyledTable = styled12("table")`
33068
- width: 100%;
33069
- `;
33070
- var StyledThead = styled12("thead")`
33071
- text-align: left;
33072
- border-bottom: 1px solid var(--j-border-color);
33073
- background-color: var(--j-neutral-100);
33074
-
33075
- @media (prefers-color-scheme: dark) {
33076
- background-color: var(--j-neutral-925);
33077
- }
33078
- `;
33079
- var StyledTbody = styled12("tbody")`
33080
- tr {
33081
- border-bottom: 1px solid var(--j-border-color);
33082
-
33083
- &:last-child {
33084
- border-bottom: none;
33085
- }
33086
- }
33087
- `;
33088
- var StyledTh = styled12("th")`
33089
- font-weight: 500;
33090
- padding: 0.5rem 0.75rem;
33091
- color: var(--j-text-color-strong);
33092
- `;
33093
- var StyledTd = styled12("td")`
33094
- padding: 0.5rem 0.75rem;
33095
- `;
33096
- var Table = import_react10.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyledTable, { ref, ...props, children }));
33097
- var TableHead = import_react10.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyledThead, { ref, ...props, children }));
33098
- var TableBody = import_react10.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyledTbody, { ref, ...props, children }));
33099
- var TableRow = import_react10.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tr", { ref, ...props, children }));
33100
- var TableHeader = import_react10.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyledTh, { ref, ...props, children }));
33101
- var TableCell = import_react10.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StyledTd, { ref, ...props, children }));
33102
-
33103
32991
  // src/inspector/ui/modal.tsx
33104
- var import_react11 = __toESM(require_react(), 1);
33105
- import { styled as styled13 } from "goober";
33106
- var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
33107
- var ModalContent = styled13("dialog")`
32992
+ var import_react9 = __toESM(require_react(), 1);
32993
+ import { styled as styled12 } from "goober";
32994
+ var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
32995
+ var ModalContent = styled12("dialog")`
33108
32996
  background-color: var(--j-background);
33109
32997
  border-radius: var(--j-radius-lg);
33110
32998
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
@@ -33117,24 +33005,24 @@ var ModalContent = styled13("dialog")`
33117
33005
  }
33118
33006
 
33119
33007
  `;
33120
- var ModalHeader = styled13("div")`
33008
+ var ModalHeader = styled12("div")`
33121
33009
  display: flex;
33122
33010
  justify-content: space-between;
33123
33011
  align-items: flex-start;
33124
33012
  padding: 1.5rem 1.5rem 0 1.5rem;
33125
33013
  gap: 1rem;
33126
33014
  `;
33127
- var ModalBody = styled13("div")`
33015
+ var ModalBody = styled12("div")`
33128
33016
  padding: 1rem 1.5rem;
33129
33017
  flex: 1;
33130
33018
  `;
33131
- var ModalFooter = styled13("div")`
33019
+ var ModalFooter = styled12("div")`
33132
33020
  display: flex;
33133
33021
  justify-content: flex-end;
33134
33022
  gap: 0.75rem;
33135
33023
  padding: 0 1.5rem 1.5rem 1.5rem;
33136
33024
  `;
33137
- var CloseButton = styled13("button")`
33025
+ var CloseButton = styled12("button")`
33138
33026
  background: none;
33139
33027
  border: none;
33140
33028
  cursor: pointer;
@@ -33158,7 +33046,7 @@ var CloseButton = styled13("button")`
33158
33046
  outline-offset: 2px;
33159
33047
  }
33160
33048
  `;
33161
- var Modal = (0, import_react11.forwardRef)(
33049
+ var Modal = (0, import_react9.forwardRef)(
33162
33050
  ({
33163
33051
  isOpen,
33164
33052
  onClose,
@@ -33172,8 +33060,8 @@ var Modal = (0, import_react11.forwardRef)(
33172
33060
  showButtons = true,
33173
33061
  className
33174
33062
  }, ref) => {
33175
- const modalRef = (0, import_react11.useRef)(null);
33176
- (0, import_react11.useEffect)(() => {
33063
+ const modalRef = (0, import_react9.useRef)(null);
33064
+ (0, import_react9.useEffect)(() => {
33177
33065
  if (isOpen) {
33178
33066
  modalRef.current?.showModal();
33179
33067
  } else {
@@ -33190,7 +33078,7 @@ var Modal = (0, import_react11.forwardRef)(
33190
33078
  onClose();
33191
33079
  };
33192
33080
  if (!isOpen) return null;
33193
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
33081
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
33194
33082
  ModalContent,
33195
33083
  {
33196
33084
  ref: ref || modalRef,
@@ -33199,17 +33087,17 @@ var Modal = (0, import_react11.forwardRef)(
33199
33087
  "aria-labelledby": "modal-heading",
33200
33088
  onClose,
33201
33089
  children: [
33202
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(ModalHeader, { children: [
33203
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Heading, { id: "modal-heading", children: heading }),
33204
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CloseButton, { onClick: onClose, "aria-label": "Close modal", type: "button", children: "\xD7" })
33090
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ModalHeader, { children: [
33091
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Heading, { id: "modal-heading", children: heading }),
33092
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CloseButton, { onClick: onClose, "aria-label": "Close modal", type: "button", children: "\xD7" })
33205
33093
  ] }),
33206
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(ModalBody, { children: [
33207
- text && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { style: { margin: "0 0 1rem 0", color: "var(--j-text-color)" }, children: text }),
33094
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ModalBody, { children: [
33095
+ text && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { style: { margin: "0 0 1rem 0", color: "var(--j-text-color)" }, children: text }),
33208
33096
  children
33209
33097
  ] }),
33210
- showButtons && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(ModalFooter, { children: [
33211
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Button, { variant: "secondary", onClick: handleCancel, children: cancelText }),
33212
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Button, { variant: "primary", onClick: handleConfirm, children: confirmText })
33098
+ showButtons && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ModalFooter, { children: [
33099
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant: "secondary", onClick: handleCancel, children: cancelText }),
33100
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant: "primary", onClick: handleConfirm, children: confirmText })
33213
33101
  ] })
33214
33102
  ]
33215
33103
  }
@@ -33219,19 +33107,19 @@ var Modal = (0, import_react11.forwardRef)(
33219
33107
  Modal.displayName = "Modal";
33220
33108
 
33221
33109
  // src/inspector/ui/select.tsx
33222
- var import_react12 = __toESM(require_react(), 1);
33223
- import { styled as styled14 } from "goober";
33224
- var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
33225
- var SelectContainer = styled14("div")`
33110
+ var import_react10 = __toESM(require_react(), 1);
33111
+ import { styled as styled13 } from "goober";
33112
+ var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
33113
+ var SelectContainer = styled13("div")`
33226
33114
  display: grid;
33227
33115
  gap: 0.25rem;
33228
33116
  `;
33229
- var SelectWrapper = styled14("div")`
33117
+ var SelectWrapper = styled13("div")`
33230
33118
  position: relative;
33231
33119
  display: flex;
33232
33120
  align-items: center;
33233
33121
  `;
33234
- var StyledSelect = styled14("select")`
33122
+ var StyledSelect = styled13("select")`
33235
33123
  width: 100%;
33236
33124
  border-radius: var(--j-radius-md);
33237
33125
  border: 1px solid var(--j-border-color);
@@ -33249,7 +33137,7 @@ var StyledSelect = styled14("select")`
33249
33137
  background-color: var(--j-foreground);
33250
33138
  }
33251
33139
  `;
33252
- var SelectIcon = styled14("span")`
33140
+ var SelectIcon = styled13("span")`
33253
33141
  position: absolute;
33254
33142
  right: 0.5em;
33255
33143
  color: var(--j-neutral-400);
@@ -33261,20 +33149,62 @@ var SelectIcon = styled14("span")`
33261
33149
  `;
33262
33150
  function Select(props) {
33263
33151
  const { label, hideLabel, id: customId, className, ...selectProps } = props;
33264
- const generatedId = (0, import_react12.useId)();
33152
+ const generatedId = (0, import_react10.useId)();
33265
33153
  const id = customId || generatedId;
33266
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(SelectContainer, { className, children: [
33267
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: id, className: hideLabel ? "j-sr-only" : "", children: label }),
33268
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(SelectWrapper, { children: [
33269
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledSelect, { ...selectProps, id, children: props.children }),
33270
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "chevronDown", size: "sm" }) })
33154
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(SelectContainer, { className, children: [
33155
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: id, className: hideLabel ? "j-sr-only" : "", children: label }),
33156
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(SelectWrapper, { children: [
33157
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StyledSelect, { ...selectProps, id, children: props.children }),
33158
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SelectIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: "chevronDown", size: "sm" }) })
33271
33159
  ] })
33272
33160
  ] });
33273
33161
  }
33274
33162
 
33275
33163
  // src/inspector/ui/data-table.tsx
33276
- var import_react13 = __toESM(require_react(), 1);
33277
- var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
33164
+ var import_react12 = __toESM(require_react(), 1);
33165
+
33166
+ // src/inspector/ui/table.tsx
33167
+ var import_react11 = __toESM(require_react(), 1);
33168
+ var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
33169
+ import { styled as styled14 } from "goober";
33170
+ var StyledTable = styled14("table")`
33171
+ width: 100%;
33172
+ `;
33173
+ var StyledThead = styled14("thead")`
33174
+ text-align: left;
33175
+ border-bottom: 1px solid var(--j-border-color);
33176
+ background-color: var(--j-neutral-100);
33177
+
33178
+ @media (prefers-color-scheme: dark) {
33179
+ background-color: var(--j-neutral-925);
33180
+ }
33181
+ `;
33182
+ var StyledTbody = styled14("tbody")`
33183
+ tr {
33184
+ border-bottom: 1px solid var(--j-border-color);
33185
+
33186
+ &:last-child {
33187
+ border-bottom: none;
33188
+ }
33189
+ }
33190
+ `;
33191
+ var StyledTh = styled14("th")`
33192
+ font-weight: 500;
33193
+ padding: 0.5rem 0.75rem;
33194
+ color: var(--j-text-color-strong);
33195
+ `;
33196
+ var StyledTd = styled14("td")`
33197
+ padding: 0.5rem 0.75rem;
33198
+ `;
33199
+ var Table = import_react11.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledTable, { ref, ...props, children }));
33200
+ var TableHead = import_react11.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledThead, { ref, ...props, children }));
33201
+ var TableBody = import_react11.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledTbody, { ref, ...props, children }));
33202
+ var TableRow = import_react11.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tr", { ref, ...props, children }));
33203
+ var TableHeader = import_react11.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledTh, { ref, ...props, children }));
33204
+ var TableCell = import_react11.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StyledTd, { ref, ...props, children }));
33205
+
33206
+ // src/inspector/ui/data-table.tsx
33207
+ var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
33278
33208
  function DataTable({
33279
33209
  columns,
33280
33210
  data,
@@ -33283,10 +33213,10 @@ function DataTable({
33283
33213
  getRowKey,
33284
33214
  emptyMessage = "No data available"
33285
33215
  }) {
33286
- const [currentPage, setCurrentPage] = (0, import_react13.useState)(1);
33287
- const [sortConfig, setSortConfig] = (0, import_react13.useState)(initialSort);
33288
- const [filters, setFilters] = (0, import_react13.useState)({});
33289
- const filteredData = (0, import_react13.useMemo)(() => {
33216
+ const [currentPage, setCurrentPage] = (0, import_react12.useState)(1);
33217
+ const [sortConfig, setSortConfig] = (0, import_react12.useState)(initialSort);
33218
+ const [filters, setFilters] = (0, import_react12.useState)({});
33219
+ const filteredData = (0, import_react12.useMemo)(() => {
33290
33220
  return data.filter((row) => {
33291
33221
  return Object.entries(filters).every(([columnId, filterValue]) => {
33292
33222
  if (!filterValue) return true;
@@ -33300,7 +33230,7 @@ function DataTable({
33300
33230
  });
33301
33231
  });
33302
33232
  }, [data, filters, columns]);
33303
- const sortedData = (0, import_react13.useMemo)(() => {
33233
+ const sortedData = (0, import_react12.useMemo)(() => {
33304
33234
  if (!sortConfig) return filteredData;
33305
33235
  const column = columns.find((col) => col.id === sortConfig.columnId);
33306
33236
  if (!column?.sortable) return filteredData;
@@ -33319,7 +33249,7 @@ function DataTable({
33319
33249
  const startIndex = (currentPage - 1) * pageSize;
33320
33250
  const endIndex = startIndex + pageSize;
33321
33251
  const paginatedData = sortedData.slice(startIndex, endIndex);
33322
- (0, import_react13.useEffect)(() => {
33252
+ (0, import_react12.useEffect)(() => {
33323
33253
  setCurrentPage(1);
33324
33254
  }, [filters]);
33325
33255
  const handleSort = (columnId) => {
@@ -33344,9 +33274,9 @@ function DataTable({
33344
33274
  const handlePageChange = (page) => {
33345
33275
  setCurrentPage(Math.max(1, Math.min(page, totalPages)));
33346
33276
  };
33347
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
33348
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Table, { children: [
33349
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
33277
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
33278
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Table, { children: [
33279
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
33350
33280
  "div",
33351
33281
  {
33352
33282
  style: {
@@ -33357,8 +33287,8 @@ function DataTable({
33357
33287
  },
33358
33288
  onClick: () => handleSort(column.id),
33359
33289
  children: [
33360
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: column.header }),
33361
- column.sortable && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33290
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: column.header }),
33291
+ column.sortable && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
33362
33292
  "span",
33363
33293
  {
33364
33294
  style: {
@@ -33371,8 +33301,8 @@ function DataTable({
33371
33301
  ]
33372
33302
  }
33373
33303
  ) }, column.id)) }) }),
33374
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(TableBody, { children: [
33375
- columns.some((column) => column.filterable) && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableCell, { children: column.filterable && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33304
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(TableBody, { children: [
33305
+ columns.some((column) => column.filterable) && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableCell, { children: column.filterable && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
33376
33306
  Input,
33377
33307
  {
33378
33308
  label: "Filter",
@@ -33384,7 +33314,7 @@ function DataTable({
33384
33314
  onClick: (e) => e.stopPropagation()
33385
33315
  }
33386
33316
  ) }, column.id)) }),
33387
- paginatedData.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableCell, { colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33317
+ paginatedData.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableCell, { colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
33388
33318
  "div",
33389
33319
  {
33390
33320
  style: {
@@ -33394,10 +33324,10 @@ function DataTable({
33394
33324
  },
33395
33325
  children: emptyMessage
33396
33326
  }
33397
- ) }) }) : paginatedData.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableCell, { children: column.accessor(row) }, column.id)) }, getRowKey(row, startIndex + index)))
33327
+ ) }) }) : paginatedData.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TableCell, { children: column.accessor(row) }, column.id)) }, getRowKey(row, startIndex + index)))
33398
33328
  ] })
33399
33329
  ] }),
33400
- showPagination && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
33330
+ showPagination && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
33401
33331
  "div",
33402
33332
  {
33403
33333
  style: {
@@ -33408,7 +33338,7 @@ function DataTable({
33408
33338
  padding: "8px 0"
33409
33339
  },
33410
33340
  children: [
33411
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { fontSize: "14px", opacity: 0.7 }, children: [
33341
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { fontSize: "14px", opacity: 0.7 }, children: [
33412
33342
  "Showing ",
33413
33343
  startIndex + 1,
33414
33344
  " to ",
@@ -33419,8 +33349,8 @@ function DataTable({
33419
33349
  " entries",
33420
33350
  Object.keys(filters).some((key) => filters[key]) && ` (filtered from ${data.length})`
33421
33351
  ] }),
33422
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
33423
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33352
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
33353
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
33424
33354
  Button,
33425
33355
  {
33426
33356
  variant: "secondary",
@@ -33429,7 +33359,7 @@ function DataTable({
33429
33359
  children: "\xAB\xAB"
33430
33360
  }
33431
33361
  ),
33432
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33362
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
33433
33363
  Button,
33434
33364
  {
33435
33365
  variant: "secondary",
@@ -33438,13 +33368,13 @@ function DataTable({
33438
33368
  children: "\xAB"
33439
33369
  }
33440
33370
  ),
33441
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { style: { fontSize: "14px" }, children: [
33371
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { style: { fontSize: "14px" }, children: [
33442
33372
  "Page ",
33443
33373
  currentPage,
33444
33374
  " of ",
33445
33375
  totalPages
33446
33376
  ] }),
33447
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33377
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
33448
33378
  Button,
33449
33379
  {
33450
33380
  variant: "secondary",
@@ -33453,7 +33383,7 @@ function DataTable({
33453
33383
  children: "\xBB"
33454
33384
  }
33455
33385
  ),
33456
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33386
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
33457
33387
  Button,
33458
33388
  {
33459
33389
  variant: "secondary",
@@ -33469,8 +33399,122 @@ function DataTable({
33469
33399
  ] });
33470
33400
  }
33471
33401
 
33472
- // src/inspector/viewer/group-view.tsx
33402
+ // src/inspector/ui/accordion.tsx
33403
+ var import_react13 = __toESM(require_react(), 1);
33404
+ var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
33405
+ import { styled as styled15 } from "goober";
33406
+ function Accordion({ title, children, storageKey }) {
33407
+ const [open, setOpen] = useStoragedState(storageKey, false);
33408
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
33409
+ "details",
33410
+ {
33411
+ open,
33412
+ style: { display: "flex", flexDirection: "column", gap: "1rem" },
33413
+ children: [
33414
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
33415
+ StyledSummary,
33416
+ {
33417
+ onClick: (e) => {
33418
+ e.preventDefault();
33419
+ setOpen((v) => !v);
33420
+ },
33421
+ children: title
33422
+ }
33423
+ ),
33424
+ children
33425
+ ]
33426
+ }
33427
+ );
33428
+ }
33429
+ function useStoragedState(key, defaultValue) {
33430
+ const [state, setState] = (0, import_react13.useState)(() => {
33431
+ if (typeof window === "undefined") return defaultValue;
33432
+ const stored = localStorage.getItem(key);
33433
+ return stored ? JSON.parse(stored) : defaultValue;
33434
+ });
33435
+ (0, import_react13.useEffect)(() => {
33436
+ localStorage.setItem(key, JSON.stringify(state));
33437
+ }, [state]);
33438
+ return [state, setState];
33439
+ }
33440
+ var StyledSummary = styled15("summary")`
33441
+ font-size: 1.125rem;
33442
+ cursor: pointer;
33443
+ font-weight: 500;
33444
+ color: var(--j-text-color-strong);
33445
+ `;
33446
+
33447
+ // src/inspector/viewer/raw-data-card.tsx
33448
+ var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
33449
+ function CopyButton({ data }) {
33450
+ const [copyCount, setCopyCount] = (0, import_react14.useState)(0);
33451
+ const copied = copyCount > 0;
33452
+ const stringifiedData = JSON.stringify(data);
33453
+ (0, import_react14.useEffect)(() => {
33454
+ if (copyCount > 0) {
33455
+ const timeout = setTimeout(() => setCopyCount(0), 1e3);
33456
+ return () => {
33457
+ clearTimeout(timeout);
33458
+ };
33459
+ }
33460
+ }, [copyCount]);
33461
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
33462
+ Button,
33463
+ {
33464
+ style: {
33465
+ position: "absolute",
33466
+ top: "10px",
33467
+ right: "10px"
33468
+ },
33469
+ onClick: () => {
33470
+ window.navigator.clipboard.writeText(stringifiedData).then(() => {
33471
+ setCopyCount((count) => count + 1);
33472
+ });
33473
+ },
33474
+ variant: "secondary",
33475
+ children: copied ? "Copied" : "Copy"
33476
+ }
33477
+ );
33478
+ }
33479
+ function RawDataCard({ data }) {
33480
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Accordion, { title: "Raw data", storageKey: "jazz-inspector-show-raw-data", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Card, { style: { position: "relative" }, children: [
33481
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CardHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CopyButton, { data }) }),
33482
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CardBody, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ValueRenderer, { json: data }) })
33483
+ ] }) });
33484
+ }
33485
+
33486
+ // src/inspector/viewer/account-view.tsx
33487
+ var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
33488
+ function AccountView({
33489
+ data,
33490
+ onNavigate,
33491
+ node
33492
+ }) {
33493
+ const readableData = { ...data };
33494
+ for (const key in readableData) {
33495
+ if (key === "readKey" || key.startsWith("sealer_z") || key.startsWith("key_z")) {
33496
+ delete readableData[key];
33497
+ }
33498
+ }
33499
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
33500
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(GridView, { data: readableData, onNavigate, node }),
33501
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RawDataCard, { data })
33502
+ ] });
33503
+ }
33504
+
33505
+ // src/inspector/viewer/co-plain-text-view.tsx
33473
33506
  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
33507
+ function CoPlainTextView({ data }) {
33508
+ if (!data) return;
33509
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
33510
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { children: Object.values(data).join("") }),
33511
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(RawDataCard, { data })
33512
+ ] });
33513
+ }
33514
+
33515
+ // src/inspector/viewer/group-view.tsx
33516
+ var import_react15 = __toESM(require_react(), 1);
33517
+ var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
33474
33518
  function partitionMembers(data) {
33475
33519
  const everyone = Object.entries(data).filter(([key]) => key === "everyone").map(([key, value]) => ({
33476
33520
  id: key,
@@ -33498,7 +33542,7 @@ function GroupView({
33498
33542
  onNavigate,
33499
33543
  node
33500
33544
  }) {
33501
- const [addMemberType, setAddMemberType] = (0, import_react14.useState)(null);
33545
+ const [addMemberType, setAddMemberType] = (0, import_react15.useState)(null);
33502
33546
  const { everyone, members, parentGroups, childGroups } = partitionMembers(
33503
33547
  data
33504
33548
  );
@@ -33577,28 +33621,28 @@ function GroupView({
33577
33621
  alert(`Failed to add ${addMemberType}: ${error.message}`);
33578
33622
  }
33579
33623
  };
33580
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
33581
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Table, { children: [
33582
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(TableRow, { children: [
33583
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableHeader, { children: "Member" }),
33584
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableHeader, { children: "Permission" }),
33585
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableHeader, {})
33624
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
33625
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Table, { children: [
33626
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TableRow, { children: [
33627
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableHeader, { children: "Member" }),
33628
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableHeader, { children: "Permission" }),
33629
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableHeader, {})
33586
33630
  ] }) }),
33587
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(TableBody, { children: [
33588
- everyone.map((member) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(TableRow, { children: [
33589
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: member.id }),
33590
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: member.role }),
33591
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: member.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33631
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TableBody, { children: [
33632
+ everyone.map((member) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TableRow, { children: [
33633
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { children: member.id }),
33634
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { children: member.role }),
33635
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { children: member.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33592
33636
  Button,
33593
33637
  {
33594
33638
  variant: "secondary",
33595
33639
  onClick: () => onRemoveMember(member.id),
33596
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "delete" })
33640
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "delete" })
33597
33641
  }
33598
33642
  ) })
33599
33643
  ] }, member.id)),
33600
- members.map((member) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(TableRow, { children: [
33601
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33644
+ members.map((member) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TableRow, { children: [
33645
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33602
33646
  AccountOrGroupText,
33603
33647
  {
33604
33648
  coId: member.id,
@@ -33609,18 +33653,18 @@ function GroupView({
33609
33653
  }
33610
33654
  }
33611
33655
  ) }),
33612
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: member.role }),
33613
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: member.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33656
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { children: member.role }),
33657
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { children: member.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33614
33658
  Button,
33615
33659
  {
33616
33660
  variant: "secondary",
33617
33661
  onClick: () => onRemoveMember(member.id),
33618
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "delete" })
33662
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "delete" })
33619
33663
  }
33620
33664
  ) })
33621
33665
  ] }, member.id)),
33622
- parentGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(TableRow, { children: [
33623
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33666
+ parentGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TableRow, { children: [
33667
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33624
33668
  AccountOrGroupText,
33625
33669
  {
33626
33670
  coId: group.id,
@@ -33631,19 +33675,19 @@ function GroupView({
33631
33675
  }
33632
33676
  }
33633
33677
  ) }),
33634
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: group.role }),
33635
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: group.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33678
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { children: group.role }),
33679
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { children: group.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33636
33680
  Button,
33637
33681
  {
33638
33682
  variant: "secondary",
33639
33683
  onClick: () => onRemoveGroup(group.id),
33640
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "delete" })
33684
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "delete" })
33641
33685
  }
33642
33686
  ) })
33643
33687
  ] }, group.id))
33644
33688
  ] })
33645
33689
  ] }),
33646
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
33690
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
33647
33691
  "div",
33648
33692
  {
33649
33693
  style: {
@@ -33653,14 +33697,14 @@ function GroupView({
33653
33697
  marginTop: "1rem"
33654
33698
  },
33655
33699
  children: [
33656
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Button, { variant: "primary", onClick: () => setAddMemberType("account"), children: "Add Account" }),
33657
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Button, { variant: "primary", onClick: () => setAddMemberType("group"), children: "Add Group" })
33700
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { variant: "primary", onClick: () => setAddMemberType("account"), children: "Add Account" }),
33701
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { variant: "primary", onClick: () => setAddMemberType("group"), children: "Add Group" })
33658
33702
  ]
33659
33703
  }
33660
33704
  ),
33661
- childGroups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Table, { children: [
33662
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableHeader, { children: "Member of" }) }) }),
33663
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableBody, { children: childGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33705
+ childGroups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Table, { children: [
33706
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableHeader, { children: "Member of" }) }) }),
33707
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableBody, { children: childGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33664
33708
  AccountOrGroupText,
33665
33709
  {
33666
33710
  coId: group.id,
@@ -33672,20 +33716,20 @@ function GroupView({
33672
33716
  }
33673
33717
  ) }) }, group.id)) })
33674
33718
  ] }),
33675
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(RawDataCard, { data }),
33676
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33719
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RawDataCard, { data }),
33720
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33677
33721
  Modal,
33678
33722
  {
33679
33723
  isOpen: addMemberType !== null,
33680
33724
  onClose: () => setAddMemberType(null),
33681
33725
  heading: addMemberType === "account" ? "Add Account" : "Add Group",
33682
33726
  showButtons: false,
33683
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("form", { onSubmit: handleAddMemberSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
33727
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("form", { onSubmit: handleAddMemberSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
33684
33728
  "div",
33685
33729
  {
33686
33730
  style: { display: "flex", flexDirection: "column", gap: "1rem" },
33687
33731
  children: [
33688
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33732
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33689
33733
  Input,
33690
33734
  {
33691
33735
  name: "memberId",
@@ -33694,13 +33738,13 @@ function GroupView({
33694
33738
  required: true
33695
33739
  }
33696
33740
  ),
33697
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Select, { name: "role", label: "Role", children: [
33698
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "reader", children: "Reader" }),
33699
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "writer", children: "Writer" }),
33700
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "admin", children: "Admin" }),
33701
- addMemberType === "account" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "writeOnly", children: "Write Only" }) }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "inherit", children: "Inherit" }) })
33741
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Select, { name: "role", label: "Role", children: [
33742
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "reader", children: "Reader" }),
33743
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "writer", children: "Writer" }),
33744
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "admin", children: "Admin" }),
33745
+ addMemberType === "account" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "writeOnly", children: "Write Only" }) }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "inherit", children: "Inherit" }) })
33702
33746
  ] }),
33703
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
33747
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
33704
33748
  "div",
33705
33749
  {
33706
33750
  style: {
@@ -33710,7 +33754,7 @@ function GroupView({
33710
33754
  marginTop: "0.5rem"
33711
33755
  },
33712
33756
  children: [
33713
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33757
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33714
33758
  Button,
33715
33759
  {
33716
33760
  type: "button",
@@ -33719,7 +33763,7 @@ function GroupView({
33719
33763
  children: "Cancel"
33720
33764
  }
33721
33765
  ),
33722
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Button, { type: "submit", variant: "primary", children: "Add" })
33766
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { type: "submit", variant: "primary", children: "Add" })
33723
33767
  ]
33724
33768
  }
33725
33769
  )
@@ -33732,7 +33776,7 @@ function GroupView({
33732
33776
  }
33733
33777
 
33734
33778
  // src/inspector/viewer/role-display.tsx
33735
- var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
33779
+ var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
33736
33780
  function RoleDisplay({
33737
33781
  node,
33738
33782
  value
@@ -33751,24 +33795,24 @@ function RoleDisplay({
33751
33795
  } else {
33752
33796
  role = "unauthorized";
33753
33797
  }
33754
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Text, { children: [
33798
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { children: [
33755
33799
  "Role: ",
33756
33800
  role
33757
33801
  ] });
33758
33802
  }
33759
33803
 
33760
33804
  // src/inspector/viewer/table-viewer.tsx
33761
- var import_react15 = __toESM(require_react(), 1);
33762
- import { styled as styled15 } from "goober";
33763
- var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
33764
- var PaginationContainer = styled15("div")`
33805
+ var import_react16 = __toESM(require_react(), 1);
33806
+ import { styled as styled16 } from "goober";
33807
+ var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
33808
+ var PaginationContainer = styled16("div")`
33765
33809
  padding: 1rem 0;
33766
33810
  display: flex;
33767
33811
  align-items: center;
33768
33812
  justify-content: space-between;
33769
33813
  gap: 0.5rem;
33770
33814
  `;
33771
- var RedTooltip = styled15("span")`
33815
+ var RedTooltip = styled16("span")`
33772
33816
  position:relative; /* making the .tooltip span a container for the tooltip text */
33773
33817
  border-bottom:1px dashed #000; /* little indicater to indicate it's hoverable */
33774
33818
 
@@ -33805,8 +33849,8 @@ function CoValuesTableView({
33805
33849
  onNavigate,
33806
33850
  onRemove
33807
33851
  }) {
33808
- const [visibleRowsCount, setVisibleRowsCount] = (0, import_react15.useState)(10);
33809
- const [coIdArray, visibleRows] = (0, import_react15.useMemo)(() => {
33852
+ const [visibleRowsCount, setVisibleRowsCount] = (0, import_react16.useState)(10);
33853
+ const [coIdArray, visibleRows] = (0, import_react16.useMemo)(() => {
33810
33854
  const coIdArray2 = Array.isArray(data) ? data : Object.values(data).every((k) => typeof k === "string" && isCoId(k)) ? Object.values(data).map((k) => k) : [];
33811
33855
  const visibleRows2 = coIdArray2.slice(0, visibleRowsCount);
33812
33856
  return [coIdArray2, visibleRows2];
@@ -33814,10 +33858,10 @@ function CoValuesTableView({
33814
33858
  const resolvedRows = useResolvedCoValues(visibleRows, node);
33815
33859
  const hasMore = visibleRowsCount < coIdArray.length;
33816
33860
  if (!coIdArray.length) {
33817
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: "No data to display" });
33861
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { children: "No data to display" });
33818
33862
  }
33819
33863
  if (resolvedRows.length === 0) {
33820
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: "Loading..." });
33864
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { children: "Loading..." });
33821
33865
  }
33822
33866
  const keys = Array.from(
33823
33867
  new Set(
@@ -33827,15 +33871,15 @@ function CoValuesTableView({
33827
33871
  const loadMore = () => {
33828
33872
  setVisibleRowsCount((prevVisibleRows) => prevVisibleRows + 10);
33829
33873
  };
33830
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
33831
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Table, { children: [
33832
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(TableRow, { children: [
33833
- ["ID", ...keys, "Action"].map((key) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableHeader, { children: key }, key)),
33834
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableHeader, {})
33874
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
33875
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Table, { children: [
33876
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(TableRow, { children: [
33877
+ ["ID", ...keys, "Action"].map((key) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableHeader, { children: key }, key)),
33878
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableHeader, {})
33835
33879
  ] }) }),
33836
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableBody, { children: resolvedRows.slice(0, visibleRowsCount).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(TableRow, { children: [
33837
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { mono: true, children: item.snapshot === "unavailable" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(RedTooltip, { "data-text": "Unavailable", children: [
33838
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
33880
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableBody, { children: resolvedRows.slice(0, visibleRowsCount).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(TableRow, { children: [
33881
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { mono: true, children: item.snapshot === "unavailable" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(RedTooltip, { "data-text": "Unavailable", children: [
33882
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
33839
33883
  Icon,
33840
33884
  {
33841
33885
  name: "caution",
@@ -33848,7 +33892,7 @@ function CoValuesTableView({
33848
33892
  ),
33849
33893
  visibleRows[index]
33850
33894
  ] }) : visibleRows[index] }) }),
33851
- keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableCell, { children: item.snapshot !== "unavailable" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
33895
+ keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableCell, { children: item.snapshot !== "unavailable" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
33852
33896
  ValueRenderer,
33853
33897
  {
33854
33898
  json: item.snapshot[key],
@@ -33869,7 +33913,7 @@ function CoValuesTableView({
33869
33913
  }
33870
33914
  }
33871
33915
  ) }, key)),
33872
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
33916
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
33873
33917
  Button,
33874
33918
  {
33875
33919
  variant: "secondary",
@@ -33882,18 +33926,18 @@ function CoValuesTableView({
33882
33926
  children: "View"
33883
33927
  }
33884
33928
  ) }),
33885
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
33929
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
33886
33930
  ] }, index)) })
33887
33931
  ] }),
33888
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(PaginationContainer, { children: [
33889
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { muted: true, small: true, children: [
33932
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(PaginationContainer, { children: [
33933
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { muted: true, small: true, children: [
33890
33934
  "Showing ",
33891
33935
  Math.min(visibleRowsCount, coIdArray.length),
33892
33936
  " of",
33893
33937
  " ",
33894
33938
  coIdArray.length
33895
33939
  ] }),
33896
- hasMore && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { variant: "secondary", onClick: loadMore, children: "Load more" })
33940
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { variant: "secondary", onClick: loadMore, children: "Load more" })
33897
33941
  ] })
33898
33942
  ] });
33899
33943
  }
@@ -33903,11 +33947,11 @@ function TableView({
33903
33947
  onNavigate,
33904
33948
  onRemove
33905
33949
  }) {
33906
- const isListOfCoValues = (0, import_react15.useMemo)(() => {
33950
+ const isListOfCoValues = (0, import_react16.useMemo)(() => {
33907
33951
  return Array.isArray(data) && data.every((k) => isCoId(k));
33908
33952
  }, [data]);
33909
33953
  if (isListOfCoValues) {
33910
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
33954
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
33911
33955
  CoValuesTableView,
33912
33956
  {
33913
33957
  data,
@@ -33917,29 +33961,29 @@ function TableView({
33917
33961
  }
33918
33962
  );
33919
33963
  }
33920
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Table, { children: [
33921
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(TableRow, { children: [
33922
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableHeader, { style: { width: "5rem" }, children: "Index" }),
33923
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableHeader, { children: "Value" }),
33924
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableHeader, { children: "Action" })
33964
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Table, { children: [
33965
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(TableRow, { children: [
33966
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableHeader, { style: { width: "5rem" }, children: "Index" }),
33967
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableHeader, { children: "Value" }),
33968
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableHeader, { children: "Action" })
33925
33969
  ] }) }),
33926
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableBody, { children: Array.isArray(data) && data?.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(TableRow, { children: [
33927
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { mono: true, children: index }) }),
33928
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ValueRenderer, { json: value }) }),
33929
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
33970
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableBody, { children: Array.isArray(data) && data?.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(TableRow, { children: [
33971
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { mono: true, children: index }) }),
33972
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ValueRenderer, { json: value }) }),
33973
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
33930
33974
  ] }, index)) })
33931
33975
  ] });
33932
33976
  }
33933
33977
 
33934
33978
  // src/inspector/viewer/history-view.tsx
33935
- var import_react16 = __toESM(require_react(), 1);
33936
- import { styled as styled16 } from "goober";
33937
- var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
33979
+ var import_react17 = __toESM(require_react(), 1);
33980
+ import { styled as styled17 } from "goober";
33981
+ var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
33938
33982
  function HistoryView({
33939
33983
  coValue,
33940
33984
  node
33941
33985
  }) {
33942
- const transactions = (0, import_react16.useMemo)(
33986
+ const transactions = (0, import_react17.useMemo)(
33943
33987
  () => getHistory(coValue),
33944
33988
  [coValue.core.verifiedTransactions.length]
33945
33989
  );
@@ -33947,8 +33991,8 @@ function HistoryView({
33947
33991
  {
33948
33992
  id: "author",
33949
33993
  header: "Author",
33950
- accessor: (row) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
33951
- row.isValid || /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RedTooltip2, { "data-text": "This transaction is invalid and is not used", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
33994
+ accessor: (row) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
33995
+ row.isValid || /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RedTooltip2, { "data-text": "This transaction is invalid and is not used", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33952
33996
  Icon,
33953
33997
  {
33954
33998
  name: "caution",
@@ -33961,7 +34005,7 @@ function HistoryView({
33961
34005
  }
33962
34006
  }
33963
34007
  ) }),
33964
- row.author.startsWith("co_") ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
34008
+ row.author.startsWith("co_") ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33965
34009
  AccountOrGroupText,
33966
34010
  {
33967
34011
  coId: row.author,
@@ -33978,7 +34022,16 @@ function HistoryView({
33978
34022
  {
33979
34023
  id: "action",
33980
34024
  header: "Action",
33981
- accessor: (row) => row.action,
34025
+ accessor: (row) => {
34026
+ if (row.isValid) return row.action;
34027
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
34028
+ row.action,
34029
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { style: { color: "red", display: "block" }, children: [
34030
+ "Invalid transaction: ",
34031
+ row.validationErrorMessage
34032
+ ] })
34033
+ ] });
34034
+ },
33982
34035
  sortable: false,
33983
34036
  filterable: true,
33984
34037
  sortFn: (a, b) => a.action.localeCompare(b.action)
@@ -33992,20 +34045,17 @@ function HistoryView({
33992
34045
  sortFn: (a, b) => a.timestamp.getTime() - b.timestamp.getTime()
33993
34046
  }
33994
34047
  ];
33995
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("section", { style: { display: "flex", flexDirection: "column", gap: "1rem" }, children: [
33996
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Heading, { children: "CoValue history" }),
33997
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
33998
- DataTable,
33999
- {
34000
- columns,
34001
- data: transactions,
34002
- pageSize: 10,
34003
- initialSort: { columnId: "timestamp", direction: "desc" },
34004
- getRowKey: (row) => row.id,
34005
- emptyMessage: "No history available"
34006
- }
34007
- )
34008
- ] });
34048
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Accordion, { title: "CoValue history", storageKey: "jazz-inspector-show-history", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34049
+ DataTable,
34050
+ {
34051
+ columns,
34052
+ data: transactions,
34053
+ pageSize: 10,
34054
+ initialSort: { columnId: "timestamp", direction: "desc" },
34055
+ getRowKey: (row) => row.id,
34056
+ emptyMessage: "No history available"
34057
+ }
34058
+ ) });
34009
34059
  }
34010
34060
  function getTransactionChanges(tx, coValue) {
34011
34061
  if (tx.isValid === false && tx.tx.privacy === "private") {
@@ -34029,7 +34079,8 @@ function getHistory(coValue) {
34029
34079
  author: tx.author,
34030
34080
  action: mapTransactionToAction(change, coValue),
34031
34081
  timestamp: new Date(tx.currentMadeAt),
34032
- isValid: tx.isValid
34082
+ isValid: tx.isValid,
34083
+ validationErrorMessage: tx.validationErrorMessage
34033
34084
  }));
34034
34085
  });
34035
34086
  }
@@ -34093,7 +34144,7 @@ function mapTransactionToAction(change, coValue) {
34093
34144
  return `Stream ended`;
34094
34145
  }
34095
34146
  if (isPropertySet(change)) {
34096
- return `Property "${change.key}" has been set to "${change.value}"`;
34147
+ return `Property "${change.key}" has been set to ${JSON.stringify(change.value)}`;
34097
34148
  }
34098
34149
  if (isPropertyDeletion(change)) {
34099
34150
  return `Property "${change.key}" has been deleted`;
@@ -34144,7 +34195,7 @@ var isStreamChunk = (change) => {
34144
34195
  var isStreamEnd = (change) => {
34145
34196
  return change?.type === "end";
34146
34197
  };
34147
- var RedTooltip2 = styled16("span")`
34198
+ var RedTooltip2 = styled17("span")`
34148
34199
  position:relative; /* making the .tooltip span a container for the tooltip text */
34149
34200
  border-bottom:1px dashed #000; /* little indicater to indicate it's hoverable */
34150
34201
 
@@ -34177,11 +34228,11 @@ var RedTooltip2 = styled16("span")`
34177
34228
  `;
34178
34229
 
34179
34230
  // src/inspector/viewer/page.tsx
34180
- var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
34181
- var BasePageContainer = import_react17.default.forwardRef(
34182
- ({ isTopLevel, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, ...rest })
34231
+ var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
34232
+ var BasePageContainer = import_react18.default.forwardRef(
34233
+ ({ isTopLevel, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, ...rest })
34183
34234
  );
34184
- var PageContainer = styled17(BasePageContainer)`
34235
+ var PageContainer = styled18(BasePageContainer)`
34185
34236
  position: absolute;
34186
34237
  z-index: 10;
34187
34238
  inset: 0;
@@ -34189,36 +34240,36 @@ var PageContainer = styled17(BasePageContainer)`
34189
34240
  height: 100%;
34190
34241
  padding: 0 0.75rem;
34191
34242
  `;
34192
- var BackButton = styled17("div")`
34243
+ var BackButton = styled18("div")`
34193
34244
  position: absolute;
34194
34245
  left: 0;
34195
34246
  right: 0;
34196
34247
  top: 0;
34197
34248
  height: 2.5rem;
34198
34249
  `;
34199
- var HeaderContainer = styled17("div")`
34250
+ var HeaderContainer = styled18("div")`
34200
34251
  display: flex;
34201
34252
  justify-content: space-between;
34202
34253
  align-items: center;
34203
34254
  margin-bottom: 1rem;
34204
34255
  `;
34205
- var TitleContainer = styled17("div")`
34256
+ var TitleContainer = styled18("div")`
34206
34257
  display: flex;
34207
34258
  align-items: center;
34208
34259
  gap: 0.75rem;
34209
34260
  `;
34210
- var Title = styled17(Heading)`
34261
+ var Title = styled18(Heading)`
34211
34262
  display: flex;
34212
34263
  flex-direction: column;
34213
34264
  align-items: flex-start;
34214
34265
  gap: 0.25rem;
34215
34266
  `;
34216
- var BadgeContainer = styled17("div")`
34267
+ var BadgeContainer = styled18("div")`
34217
34268
  display: flex;
34218
34269
  align-items: center;
34219
34270
  gap: 0.75rem;
34220
34271
  `;
34221
- var ContentContainer = styled17("div")`
34272
+ var ContentContainer = styled18("div")`
34222
34273
  overflow: auto;
34223
34274
  display: flex;
34224
34275
  flex-direction: column;
@@ -34239,7 +34290,7 @@ function View(props) {
34239
34290
  const { node, onNavigate } = props;
34240
34291
  if (!snapshot || snapshot === "unavailable") return;
34241
34292
  if (type === "costream") {
34242
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34293
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34243
34294
  CoStreamView,
34244
34295
  {
34245
34296
  data: snapshot,
@@ -34250,7 +34301,7 @@ function View(props) {
34250
34301
  );
34251
34302
  }
34252
34303
  if (extendedType === "group") {
34253
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34304
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34254
34305
  GroupView,
34255
34306
  {
34256
34307
  coValue: value,
@@ -34261,10 +34312,10 @@ function View(props) {
34261
34312
  );
34262
34313
  }
34263
34314
  if (extendedType === "account") {
34264
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AccountView, { data: snapshot, node, onNavigate });
34315
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AccountView, { data: snapshot, node, onNavigate });
34265
34316
  }
34266
34317
  if (type === "coplaintext") {
34267
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CoPlainTextView, { data: snapshot });
34318
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CoPlainTextView, { data: snapshot });
34268
34319
  }
34269
34320
  if (type === "colist") {
34270
34321
  const handleRemove = (index) => {
@@ -34273,7 +34324,7 @@ function View(props) {
34273
34324
  list.delete(index);
34274
34325
  }
34275
34326
  };
34276
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34327
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34277
34328
  TableView,
34278
34329
  {
34279
34330
  data: snapshot,
@@ -34284,9 +34335,9 @@ function View(props) {
34284
34335
  );
34285
34336
  }
34286
34337
  if (extendedType === "record") {
34287
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableView, { data: snapshot, node, onNavigate });
34338
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableView, { data: snapshot, node, onNavigate });
34288
34339
  }
34289
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GridView, { data: snapshot, onNavigate, node });
34340
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(GridView, { data: snapshot, onNavigate, node });
34290
34341
  }
34291
34342
  function Page(props) {
34292
34343
  const {
@@ -34302,13 +34353,13 @@ function Page(props) {
34302
34353
  const coValue = useResolvedCoValue(coId, node);
34303
34354
  const { value, snapshot, type, extendedType } = coValue;
34304
34355
  if (snapshot === "unavailable") {
34305
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style, children: "Data unavailable" });
34356
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style, children: "Data unavailable" });
34306
34357
  }
34307
34358
  if (!snapshot) {
34308
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style });
34359
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style });
34309
34360
  }
34310
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(PageContainer, { style, className, isTopLevel, children: [
34311
- !isTopLevel && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34361
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(PageContainer, { style, className, isTopLevel, children: [
34362
+ !isTopLevel && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34312
34363
  BackButton,
34313
34364
  {
34314
34365
  "aria-label": "Back",
@@ -34318,27 +34369,27 @@ function Page(props) {
34318
34369
  "aria-hidden": "true"
34319
34370
  }
34320
34371
  ),
34321
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HeaderContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TitleContainer, { children: [
34322
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Title, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { children: [
34372
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(HeaderContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(TitleContainer, { children: [
34373
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Title, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { children: [
34323
34374
  name,
34324
- typeof snapshot === "object" && "name" in snapshot ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { style: { color: "#57534e", fontWeight: 500 }, children: [
34375
+ typeof snapshot === "object" && "name" in snapshot ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { style: { color: "#57534e", fontWeight: 500 }, children: [
34325
34376
  " ",
34326
34377
  snapshot.name
34327
34378
  ] }) : null
34328
34379
  ] }) }),
34329
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(BadgeContainer, { children: [
34330
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Badge, { children: type && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TypeIcon, { type, extendedType }) }),
34331
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Badge, { children: coId })
34380
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(BadgeContainer, { children: [
34381
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Badge, { children: type && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TypeIcon, { type, extendedType }) }),
34382
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Badge, { children: coId })
34332
34383
  ] })
34333
34384
  ] }) }),
34334
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(ContentContainer, { children: [
34335
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(View, { ...props, coValue }),
34336
- extendedType !== "account" && extendedType !== "group" && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
34337
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RoleDisplay, { node, value }),
34338
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Text, { muted: true, children: [
34385
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(ContentContainer, { children: [
34386
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(View, { ...props, coValue }),
34387
+ extendedType !== "account" && extendedType !== "group" && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
34388
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RoleDisplay, { node, value }),
34389
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { muted: true, children: [
34339
34390
  "Owned by",
34340
34391
  " ",
34341
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34392
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34342
34393
  AccountOrGroupText,
34343
34394
  {
34344
34395
  coId: value.group.id,
@@ -34351,14 +34402,46 @@ function Page(props) {
34351
34402
  )
34352
34403
  ] })
34353
34404
  ] }),
34354
- value && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HistoryView, { coValue: value, node })
34405
+ value && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(HistoryView, { coValue: value, node })
34355
34406
  ] })
34356
34407
  ] });
34357
34408
  }
34358
34409
 
34410
+ // src/inspector/ui/error-boundary.tsx
34411
+ var import_react19 = __toESM(require_react(), 1);
34412
+ var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
34413
+ import { styled as styled19 } from "goober";
34414
+ var ErrorBoundary = class extends import_react19.default.Component {
34415
+ constructor(props) {
34416
+ super(props);
34417
+ this.state = { hasError: false };
34418
+ }
34419
+ static getDerivedStateFromError(error) {
34420
+ return { hasError: true, error };
34421
+ }
34422
+ componentDidCatch(error, errorInfo) {
34423
+ console.error(error);
34424
+ }
34425
+ render() {
34426
+ if (this.state.hasError) {
34427
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { padding: "1rem" }, children: [
34428
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledHeading2, { children: this.props.title }),
34429
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { mono: true, style: { marginTop: "0.5rem", color: "#ef4444" }, children: this.state.error?.message || "An unexpected error occurred" }),
34430
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("pre", { style: { paddingLeft: "1rem", color: "#ef4444" }, children: this.state.error?.stack })
34431
+ ] });
34432
+ }
34433
+ return this.props.children;
34434
+ }
34435
+ };
34436
+ var StyledHeading2 = styled19("h1")`
34437
+ font-size: 1.125rem;
34438
+ font-weight: 500;
34439
+ color: var(--j-text-color-strong);
34440
+ `;
34441
+
34359
34442
  // src/inspector/viewer/page-stack.tsx
34360
- var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
34361
- var PageStackContainer = styled18("div")`
34443
+ var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
34444
+ var PageStackContainer = styled20("div")`
34362
34445
  position: relative;
34363
34446
  padding: 0 0.75rem;
34364
34447
  overflow-y: auto;
@@ -34375,9 +34458,9 @@ function PageStack({
34375
34458
  }) {
34376
34459
  const page = path[path.length - 1];
34377
34460
  const index = path.length - 1;
34378
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(PageStackContainer, { children: [
34461
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(PageStackContainer, { children: [
34379
34462
  children,
34380
- node && page && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34463
+ node && page && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ErrorBoundary, { title: "An error occurred while rendering this CoValue", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34381
34464
  Page,
34382
34465
  {
34383
34466
  coId: page.coId,
@@ -34387,15 +34470,15 @@ function PageStack({
34387
34470
  onNavigate: addPages,
34388
34471
  isTopLevel: index === path.length - 1
34389
34472
  }
34390
- )
34473
+ ) })
34391
34474
  ] }) });
34392
34475
  }
34393
34476
 
34394
34477
  // src/inspector/viewer/use-page-path.ts
34395
- var import_react18 = __toESM(require_react(), 1);
34478
+ var import_react20 = __toESM(require_react(), 1);
34396
34479
  var STORAGE_KEY = "jazz-inspector-paths";
34397
34480
  function usePagePath(defaultPath) {
34398
- const [path, setPath] = (0, import_react18.useState)(() => {
34481
+ const [path, setPath] = (0, import_react20.useState)(() => {
34399
34482
  if (typeof window === "undefined") return [];
34400
34483
  const stored = localStorage.getItem(STORAGE_KEY);
34401
34484
  if (stored) {
@@ -34407,34 +34490,34 @@ function usePagePath(defaultPath) {
34407
34490
  }
34408
34491
  return defaultPath || [];
34409
34492
  });
34410
- const updatePath = (0, import_react18.useCallback)((newPath) => {
34493
+ const updatePath = (0, import_react20.useCallback)((newPath) => {
34411
34494
  setPath(newPath);
34412
34495
  localStorage.setItem(STORAGE_KEY, JSON.stringify(newPath));
34413
34496
  }, []);
34414
- (0, import_react18.useEffect)(() => {
34497
+ (0, import_react20.useEffect)(() => {
34415
34498
  if (defaultPath && JSON.stringify(path) !== JSON.stringify(defaultPath)) {
34416
34499
  updatePath(defaultPath);
34417
34500
  }
34418
34501
  }, [defaultPath, path, updatePath]);
34419
- const addPages = (0, import_react18.useCallback)(
34502
+ const addPages = (0, import_react20.useCallback)(
34420
34503
  (newPages) => {
34421
34504
  updatePath([...path, ...newPages]);
34422
34505
  },
34423
34506
  [path, updatePath]
34424
34507
  );
34425
- const goToIndex = (0, import_react18.useCallback)(
34508
+ const goToIndex = (0, import_react20.useCallback)(
34426
34509
  (index) => {
34427
34510
  updatePath(path.slice(0, index + 1));
34428
34511
  },
34429
34512
  [path, updatePath]
34430
34513
  );
34431
- const setPage = (0, import_react18.useCallback)(
34514
+ const setPage = (0, import_react20.useCallback)(
34432
34515
  (coId) => {
34433
34516
  updatePath([{ coId, name: "Root" }]);
34434
34517
  },
34435
34518
  [updatePath]
34436
34519
  );
34437
- const goBack = (0, import_react18.useCallback)(() => {
34520
+ const goBack = (0, import_react20.useCallback)(() => {
34438
34521
  if (path.length > 1) {
34439
34522
  updatePath(path.slice(0, path.length - 1));
34440
34523
  }
@@ -34449,8 +34532,8 @@ function usePagePath(defaultPath) {
34449
34532
  }
34450
34533
 
34451
34534
  // src/inspector/ui/global-styles.tsx
34452
- import { styled as styled19 } from "goober";
34453
- var GlobalStyles = styled19("div")`
34535
+ import { styled as styled21 } from "goober";
34536
+ var GlobalStyles = styled21("div")`
34454
34537
  /* Colors */
34455
34538
  --j-primary-color: #146AFF;
34456
34539
  --j-link-color: var(--j-primary-color);
@@ -34524,9 +34607,9 @@ var GlobalStyles = styled19("div")`
34524
34607
  `;
34525
34608
 
34526
34609
  // src/inspector/viewer/inspector-button.tsx
34527
- var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
34528
- import { styled as styled20 } from "goober";
34529
- var StyledInspectorButton = styled20("button")`
34610
+ var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
34611
+ import { styled as styled22 } from "goober";
34612
+ var StyledInspectorButton = styled22("button")`
34530
34613
  position: fixed;
34531
34614
  width: 2.5rem;
34532
34615
  height: 2.5rem;
@@ -34557,7 +34640,7 @@ var StyledInspectorButton = styled20("button")`
34557
34640
  }
34558
34641
  }}
34559
34642
  `;
34560
- var JazzIcon = styled20("svg")`
34643
+ var JazzIcon = styled22("svg")`
34561
34644
  width: 100%;
34562
34645
  height: auto;
34563
34646
  position: relative;
@@ -34568,8 +34651,8 @@ function InspectorButton({
34568
34651
  position = "right",
34569
34652
  ...buttonProps
34570
34653
  }) {
34571
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(StyledInspectorButton, { position, ...buttonProps, children: [
34572
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
34654
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(StyledInspectorButton, { position, ...buttonProps, children: [
34655
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34573
34656
  JazzIcon,
34574
34657
  {
34575
34658
  xmlns: "http://www.w3.org/2000/svg",
@@ -34577,7 +34660,7 @@ function InspectorButton({
34577
34660
  height: "115",
34578
34661
  viewBox: "0 0 119 115",
34579
34662
  fill: "none",
34580
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
34663
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34581
34664
  "path",
34582
34665
  {
34583
34666
  fillRule: "evenodd",
@@ -34588,7 +34671,7 @@ function InspectorButton({
34588
34671
  )
34589
34672
  }
34590
34673
  ),
34591
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
34674
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34592
34675
  "span",
34593
34676
  {
34594
34677
  style: {
@@ -34609,30 +34692,30 @@ function InspectorButton({
34609
34692
  }
34610
34693
 
34611
34694
  // src/inspector/viewer/use-open-inspector.ts
34612
- var import_react19 = __toESM(require_react(), 1);
34695
+ var import_react21 = __toESM(require_react(), 1);
34613
34696
  var STORAGE_KEY2 = "jazz-inspector-open";
34614
34697
  function useOpenInspector() {
34615
- const [open, setOpen] = (0, import_react19.useState)(() => {
34698
+ const [open, setOpen] = (0, import_react21.useState)(() => {
34616
34699
  if (typeof window === "undefined") return false;
34617
34700
  const stored = localStorage.getItem(STORAGE_KEY2);
34618
34701
  return stored ? JSON.parse(stored) : false;
34619
34702
  });
34620
- (0, import_react19.useEffect)(() => {
34703
+ (0, import_react21.useEffect)(() => {
34621
34704
  localStorage.setItem(STORAGE_KEY2, JSON.stringify(open));
34622
34705
  }, [open]);
34623
34706
  return [open, setOpen];
34624
34707
  }
34625
34708
 
34626
34709
  // src/inspector/viewer/delete-local-data.tsx
34627
- var import_react20 = __toESM(require_react(), 1);
34628
- var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
34710
+ var import_react22 = __toESM(require_react(), 1);
34711
+ var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
34629
34712
  var DELETE_LOCAL_DATA_STRING = "delete my local data";
34630
34713
  function DeleteLocalData() {
34631
- const [showDeleteModal, setShowDeleteModal] = (0, import_react20.useState)(false);
34632
- const [confirmDeleteString, setConfirmDeleteString] = (0, import_react20.useState)("");
34633
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
34634
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Button, { variant: "destructive", onClick: () => setShowDeleteModal(true), children: "Delete my local data" }),
34635
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
34714
+ const [showDeleteModal, setShowDeleteModal] = (0, import_react22.useState)(false);
34715
+ const [confirmDeleteString, setConfirmDeleteString] = (0, import_react22.useState)("");
34716
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
34717
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { variant: "destructive", onClick: () => setShowDeleteModal(true), children: "Delete my local data" }),
34718
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
34636
34719
  Modal,
34637
34720
  {
34638
34721
  isOpen: showDeleteModal,
@@ -34640,7 +34723,7 @@ function DeleteLocalData() {
34640
34723
  heading: "Delete Local Data",
34641
34724
  showButtons: false,
34642
34725
  children: [
34643
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
34726
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
34644
34727
  "div",
34645
34728
  {
34646
34729
  style: {
@@ -34651,33 +34734,33 @@ function DeleteLocalData() {
34651
34734
  gap: "0.5rem"
34652
34735
  },
34653
34736
  children: [
34654
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("p", { children: [
34737
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { children: [
34655
34738
  "This action ",
34656
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("strong", { children: "cannot" }),
34739
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("strong", { children: "cannot" }),
34657
34740
  " be undone."
34658
34741
  ] }),
34659
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("p", { children: [
34742
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { children: [
34660
34743
  "Be aware that the following data will be",
34661
34744
  " ",
34662
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("strong", { children: "permanently" }),
34745
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("strong", { children: "permanently" }),
34663
34746
  " deleted:"
34664
34747
  ] }),
34665
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("ul", { style: { listStyleType: "disc", paddingLeft: "1rem" }, children: [
34666
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("li", { children: [
34748
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("ul", { style: { listStyleType: "disc", paddingLeft: "1rem" }, children: [
34749
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("li", { children: [
34667
34750
  "Unsynced data for ",
34668
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("strong", { children: "all apps" }),
34751
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("strong", { children: "all apps" }),
34669
34752
  " on",
34670
34753
  " ",
34671
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("code", { children: window.location.origin })
34754
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("code", { children: window.location.origin })
34672
34755
  ] }),
34673
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: "Accounts" }),
34674
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: "Logged in sessions" })
34756
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("li", { children: "Accounts" }),
34757
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("li", { children: "Logged in sessions" })
34675
34758
  ] }),
34676
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", {})
34759
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", {})
34677
34760
  ]
34678
34761
  }
34679
34762
  ),
34680
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34763
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34681
34764
  Input,
34682
34765
  {
34683
34766
  label: `Type "${DELETE_LOCAL_DATA_STRING}" to confirm`,
@@ -34688,7 +34771,7 @@ function DeleteLocalData() {
34688
34771
  }
34689
34772
  }
34690
34773
  ),
34691
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34774
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34692
34775
  "p",
34693
34776
  {
34694
34777
  style: {
@@ -34698,14 +34781,14 @@ function DeleteLocalData() {
34698
34781
  flexDirection: "column",
34699
34782
  gap: "0.5rem"
34700
34783
  },
34701
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("small", { children: [
34784
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("small", { children: [
34702
34785
  "Data synced to a sync server will ",
34703
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("strong", { children: "not" }),
34786
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("strong", { children: "not" }),
34704
34787
  " be deleted, and will be synced when you log in again."
34705
34788
  ] })
34706
34789
  }
34707
34790
  ),
34708
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
34791
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
34709
34792
  "div",
34710
34793
  {
34711
34794
  style: {
@@ -34715,8 +34798,8 @@ function DeleteLocalData() {
34715
34798
  gap: "0.5rem"
34716
34799
  },
34717
34800
  children: [
34718
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Button, { variant: "secondary", onClick: () => setShowDeleteModal(false), children: "Cancel" }),
34719
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34801
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { variant: "secondary", onClick: () => setShowDeleteModal(false), children: "Cancel" }),
34802
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34720
34803
  Button,
34721
34804
  {
34722
34805
  variant: "destructive",
@@ -34743,8 +34826,8 @@ function DeleteLocalData() {
34743
34826
  }
34744
34827
 
34745
34828
  // src/inspector/viewer/new-app.tsx
34746
- var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
34747
- var InspectorContainer = styled21("div")`
34829
+ var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
34830
+ var InspectorContainer = styled23("div")`
34748
34831
  position: fixed;
34749
34832
  height: 50vh;
34750
34833
  max-height: 800px;
@@ -34761,17 +34844,17 @@ var InspectorContainer = styled21("div")`
34761
34844
  background-color: var(--j-background);
34762
34845
  }
34763
34846
  `;
34764
- var HeaderContainer2 = styled21("div")`
34847
+ var HeaderContainer2 = styled23("div")`
34765
34848
  display: flex;
34766
34849
  align-items: center;
34767
34850
  gap: 1rem;
34768
34851
  padding: 0 0.75rem;
34769
34852
  margin: 0.75rem 0;
34770
34853
  `;
34771
- var Form = styled21("form")`
34854
+ var Form = styled23("form")`
34772
34855
  width: 24rem;
34773
34856
  `;
34774
- var InitialForm = styled21("form")`
34857
+ var InitialForm = styled23("form")`
34775
34858
  display: flex;
34776
34859
  flex-direction: column;
34777
34860
  position: relative;
@@ -34783,7 +34866,7 @@ var InitialForm = styled21("form")`
34783
34866
  max-width: 24rem;
34784
34867
  margin: 0 auto;
34785
34868
  `;
34786
- var OrText = styled21("p")`
34869
+ var OrText = styled23("p")`
34787
34870
  text-align: center;
34788
34871
  `;
34789
34872
  function JazzInspectorInternal({
@@ -34792,7 +34875,7 @@ function JazzInspectorInternal({
34792
34875
  accountId
34793
34876
  }) {
34794
34877
  const [open, setOpen] = useOpenInspector();
34795
- const [coValueId, setCoValueId] = (0, import_react21.useState)("");
34878
+ const [coValueId, setCoValueId] = (0, import_react23.useState)("");
34796
34879
  const { path, addPages, goToIndex, goBack, setPage } = usePagePath();
34797
34880
  const handleCoValueIdSubmit = (e) => {
34798
34881
  e.preventDefault();
@@ -34802,12 +34885,12 @@ function JazzInspectorInternal({
34802
34885
  setCoValueId("");
34803
34886
  };
34804
34887
  if (!open) {
34805
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(InspectorButton, { position, onClick: () => setOpen(true) });
34888
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(InspectorButton, { position, onClick: () => setOpen(true) });
34806
34889
  }
34807
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(InspectorContainer, { as: GlobalStyles, style: { zIndex: 999 }, children: [
34808
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(HeaderContainer2, { children: [
34809
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Breadcrumbs, { path, onBreadcrumbClick: goToIndex }),
34810
- path.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Form, { onSubmit: handleCoValueIdSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34890
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(InspectorContainer, { as: GlobalStyles, style: { zIndex: 999 }, children: [
34891
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(HeaderContainer2, { children: [
34892
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Breadcrumbs, { path, onBreadcrumbClick: goToIndex }),
34893
+ path.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Form, { onSubmit: handleCoValueIdSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
34811
34894
  Input,
34812
34895
  {
34813
34896
  label: "CoValue ID",
@@ -34818,24 +34901,24 @@ function JazzInspectorInternal({
34818
34901
  onChange: (e) => setCoValueId(e.target.value)
34819
34902
  }
34820
34903
  ) }),
34821
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DeleteLocalData, {}),
34822
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { variant: "plain", type: "button", onClick: () => setOpen(false), children: "Close" })
34904
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DeleteLocalData, {}),
34905
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { variant: "plain", type: "button", onClick: () => setOpen(false), children: "Close" })
34823
34906
  ] }),
34824
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34907
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
34825
34908
  PageStack,
34826
34909
  {
34827
34910
  path,
34828
34911
  node: localNode,
34829
34912
  goBack,
34830
34913
  addPages,
34831
- children: path.length <= 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
34914
+ children: path.length <= 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
34832
34915
  InitialForm,
34833
34916
  {
34834
34917
  onSubmit: handleCoValueIdSubmit,
34835
34918
  "aria-hidden": path.length !== 0,
34836
34919
  children: [
34837
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Heading, { children: "Jazz CoValue Inspector" }),
34838
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34920
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Heading, { children: "Jazz CoValue Inspector" }),
34921
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
34839
34922
  Input,
34840
34923
  {
34841
34924
  label: "CoValue ID",
@@ -34846,10 +34929,10 @@ function JazzInspectorInternal({
34846
34929
  onChange: (e) => setCoValueId(e.target.value)
34847
34930
  }
34848
34931
  ),
34849
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { type: "submit", variant: "primary", children: "Inspect CoValue" }),
34850
- accountId && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
34851
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(OrText, { children: "or" }),
34852
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34932
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { type: "submit", variant: "primary", children: "Inspect CoValue" }),
34933
+ accountId && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
34934
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OrText, { children: "or" }),
34935
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
34853
34936
  Button,
34854
34937
  {
34855
34938
  variant: "secondary",
@@ -34870,8 +34953,8 @@ function JazzInspectorInternal({
34870
34953
  }
34871
34954
 
34872
34955
  // src/inspector/custom-element.tsx
34873
- var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
34874
- setup(import_react22.default.createElement);
34956
+ var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
34957
+ setup(import_react24.default.createElement);
34875
34958
  var JazzInspectorElement = class extends HTMLElement {
34876
34959
  constructor() {
34877
34960
  super(...arguments);
@@ -34913,7 +34996,7 @@ var JazzInspectorElement = class extends HTMLElement {
34913
34996
  return;
34914
34997
  }
34915
34998
  this.root?.render(
34916
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34999
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
34917
35000
  JazzInspectorInternal,
34918
35001
  {
34919
35002
  localNode: this.account.$jazz.localNode,
@@ -35039,4 +35122,4 @@ react/cjs/react-jsx-runtime.development.js:
35039
35122
  * LICENSE file in the root directory of this source tree.
35040
35123
  *)
35041
35124
  */
35042
- //# sourceMappingURL=custom-element-RBBL46TI.js.map
35125
+ //# sourceMappingURL=custom-element-QESCMFY7.js.map