jazz-tools 0.19.8 → 0.19.11

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 (154) hide show
  1. package/.turbo/turbo-build.log +56 -50
  2. package/CHANGELOG.md +30 -3
  3. package/dist/{chunk-2S3Z2CN6.js → chunk-HX5S6W5E.js} +372 -103
  4. package/dist/chunk-HX5S6W5E.js.map +1 -0
  5. package/dist/index.js +1 -1
  6. package/dist/inspector/account-switcher.d.ts +4 -0
  7. package/dist/inspector/account-switcher.d.ts.map +1 -0
  8. package/dist/inspector/chunk-C6BJPHBQ.js +4096 -0
  9. package/dist/inspector/chunk-C6BJPHBQ.js.map +1 -0
  10. package/dist/inspector/contexts/node.d.ts +19 -0
  11. package/dist/inspector/contexts/node.d.ts.map +1 -0
  12. package/dist/inspector/{custom-element-P76EIWEV.js → custom-element-GJVBPZES.js} +1011 -884
  13. package/dist/inspector/custom-element-GJVBPZES.js.map +1 -0
  14. package/dist/inspector/{viewer/new-app.d.ts → in-app.d.ts} +3 -3
  15. package/dist/inspector/in-app.d.ts.map +1 -0
  16. package/dist/inspector/index.d.ts +0 -11
  17. package/dist/inspector/index.d.ts.map +1 -1
  18. package/dist/inspector/index.js +56 -3910
  19. package/dist/inspector/index.js.map +1 -1
  20. package/dist/inspector/pages/home.d.ts +2 -0
  21. package/dist/inspector/pages/home.d.ts.map +1 -0
  22. package/dist/inspector/register-custom-element.js +1 -1
  23. package/dist/inspector/router/context.d.ts +12 -0
  24. package/dist/inspector/router/context.d.ts.map +1 -0
  25. package/dist/inspector/router/hash-router.d.ts +7 -0
  26. package/dist/inspector/router/hash-router.d.ts.map +1 -0
  27. package/dist/inspector/router/in-memory-router.d.ts +7 -0
  28. package/dist/inspector/router/in-memory-router.d.ts.map +1 -0
  29. package/dist/inspector/router/index.d.ts +5 -0
  30. package/dist/inspector/router/index.d.ts.map +1 -0
  31. package/dist/inspector/standalone.d.ts +6 -0
  32. package/dist/inspector/standalone.d.ts.map +1 -0
  33. package/dist/inspector/standalone.js +420 -0
  34. package/dist/inspector/standalone.js.map +1 -0
  35. package/dist/inspector/tests/router/hash-router.test.d.ts +2 -0
  36. package/dist/inspector/tests/router/hash-router.test.d.ts.map +1 -0
  37. package/dist/inspector/tests/router/in-memory-router.test.d.ts +2 -0
  38. package/dist/inspector/tests/router/in-memory-router.test.d.ts.map +1 -0
  39. package/dist/inspector/ui/modal.d.ts +1 -0
  40. package/dist/inspector/ui/modal.d.ts.map +1 -1
  41. package/dist/inspector/viewer/breadcrumbs.d.ts +1 -7
  42. package/dist/inspector/viewer/breadcrumbs.d.ts.map +1 -1
  43. package/dist/inspector/viewer/header.d.ts +7 -0
  44. package/dist/inspector/viewer/header.d.ts.map +1 -0
  45. package/dist/inspector/viewer/page-stack.d.ts +4 -13
  46. package/dist/inspector/viewer/page-stack.d.ts.map +1 -1
  47. package/dist/inspector/viewer/page.d.ts.map +1 -1
  48. package/dist/react/hooks.d.ts +1 -1
  49. package/dist/react/hooks.d.ts.map +1 -1
  50. package/dist/react/index.d.ts +1 -1
  51. package/dist/react/index.d.ts.map +1 -1
  52. package/dist/react/index.js +5 -1
  53. package/dist/react/index.js.map +1 -1
  54. package/dist/react-core/hooks.d.ts +59 -0
  55. package/dist/react-core/hooks.d.ts.map +1 -1
  56. package/dist/react-core/index.js +124 -36
  57. package/dist/react-core/index.js.map +1 -1
  58. package/dist/react-core/tests/testUtils.d.ts +1 -0
  59. package/dist/react-core/tests/testUtils.d.ts.map +1 -1
  60. package/dist/react-core/tests/useSuspenseAccount.test.d.ts +2 -0
  61. package/dist/react-core/tests/useSuspenseAccount.test.d.ts.map +1 -0
  62. package/dist/react-core/tests/useSuspenseCoState.test.d.ts +2 -0
  63. package/dist/react-core/tests/useSuspenseCoState.test.d.ts.map +1 -0
  64. package/dist/react-core/use.d.ts +3 -0
  65. package/dist/react-core/use.d.ts.map +1 -0
  66. package/dist/react-native/index.js +5 -1
  67. package/dist/react-native/index.js.map +1 -1
  68. package/dist/react-native-core/crypto/RNCrypto.d.ts +2 -0
  69. package/dist/react-native-core/crypto/RNCrypto.d.ts.map +1 -0
  70. package/dist/react-native-core/crypto/RNCrypto.js +3 -0
  71. package/dist/react-native-core/crypto/RNCrypto.js.map +1 -0
  72. package/dist/react-native-core/hooks.d.ts +1 -1
  73. package/dist/react-native-core/hooks.d.ts.map +1 -1
  74. package/dist/react-native-core/index.js +5 -1
  75. package/dist/react-native-core/index.js.map +1 -1
  76. package/dist/react-native-core/platform.d.ts +2 -1
  77. package/dist/react-native-core/platform.d.ts.map +1 -1
  78. package/dist/testing.js +1 -1
  79. package/dist/testing.js.map +1 -1
  80. package/dist/tools/coValues/account.d.ts +7 -1
  81. package/dist/tools/coValues/account.d.ts.map +1 -1
  82. package/dist/tools/coValues/interfaces.d.ts +1 -1
  83. package/dist/tools/coValues/interfaces.d.ts.map +1 -1
  84. package/dist/tools/implementation/ContextManager.d.ts +3 -0
  85. package/dist/tools/implementation/ContextManager.d.ts.map +1 -1
  86. package/dist/tools/implementation/zodSchema/schemaTypes/AccountSchema.d.ts +8 -1
  87. package/dist/tools/implementation/zodSchema/schemaTypes/AccountSchema.d.ts.map +1 -1
  88. package/dist/tools/implementation/zodSchema/zodCo.d.ts.map +1 -1
  89. package/dist/tools/subscribe/CoValueCoreSubscription.d.ts +8 -22
  90. package/dist/tools/subscribe/CoValueCoreSubscription.d.ts.map +1 -1
  91. package/dist/tools/subscribe/SubscriptionCache.d.ts +51 -0
  92. package/dist/tools/subscribe/SubscriptionCache.d.ts.map +1 -0
  93. package/dist/tools/subscribe/SubscriptionScope.d.ts +17 -1
  94. package/dist/tools/subscribe/SubscriptionScope.d.ts.map +1 -1
  95. package/dist/tools/subscribe/utils.d.ts +9 -1
  96. package/dist/tools/subscribe/utils.d.ts.map +1 -1
  97. package/dist/tools/testing.d.ts +2 -2
  98. package/dist/tools/testing.d.ts.map +1 -1
  99. package/dist/tools/tests/SubscriptionCache.test.d.ts +2 -0
  100. package/dist/tools/tests/SubscriptionCache.test.d.ts.map +1 -0
  101. package/package.json +18 -6
  102. package/src/inspector/account-switcher.tsx +440 -0
  103. package/src/inspector/contexts/node.tsx +129 -0
  104. package/src/inspector/custom-element.tsx +2 -2
  105. package/src/inspector/in-app.tsx +61 -0
  106. package/src/inspector/index.tsx +2 -22
  107. package/src/inspector/pages/home.tsx +77 -0
  108. package/src/inspector/router/context.ts +21 -0
  109. package/src/inspector/router/hash-router.tsx +128 -0
  110. package/src/inspector/{viewer/use-page-path.ts → router/in-memory-router.tsx} +31 -29
  111. package/src/inspector/router/index.ts +4 -0
  112. package/src/inspector/standalone.tsx +60 -0
  113. package/src/inspector/tests/router/hash-router.test.tsx +847 -0
  114. package/src/inspector/tests/router/in-memory-router.test.tsx +724 -0
  115. package/src/inspector/ui/modal.tsx +5 -2
  116. package/src/inspector/viewer/breadcrumbs.tsx +5 -11
  117. package/src/inspector/viewer/header.tsx +67 -0
  118. package/src/inspector/viewer/page-stack.tsx +18 -26
  119. package/src/inspector/viewer/page.tsx +0 -1
  120. package/src/react/hooks.tsx +2 -0
  121. package/src/react/index.ts +1 -14
  122. package/src/react-core/hooks.ts +167 -18
  123. package/src/react-core/tests/createCoValueSubscriptionContext.test.tsx +18 -8
  124. package/src/react-core/tests/testUtils.tsx +67 -5
  125. package/src/react-core/tests/useCoState.test.ts +3 -7
  126. package/src/react-core/tests/useSubscriptionSelector.test.ts +3 -7
  127. package/src/react-core/tests/useSuspenseAccount.test.tsx +343 -0
  128. package/src/react-core/tests/useSuspenseCoState.test.tsx +1182 -0
  129. package/src/react-core/use.ts +46 -0
  130. package/src/react-native-core/crypto/RNCrypto.ts +1 -0
  131. package/src/react-native-core/hooks.tsx +2 -0
  132. package/src/react-native-core/platform.ts +2 -1
  133. package/src/tools/coValues/account.ts +13 -2
  134. package/src/tools/coValues/interfaces.ts +2 -3
  135. package/src/tools/implementation/ContextManager.ts +13 -0
  136. package/src/tools/implementation/zodSchema/schemaTypes/AccountSchema.ts +8 -1
  137. package/src/tools/subscribe/CoValueCoreSubscription.ts +71 -100
  138. package/src/tools/subscribe/SubscriptionCache.ts +272 -0
  139. package/src/tools/subscribe/SubscriptionScope.ts +113 -7
  140. package/src/tools/subscribe/utils.ts +77 -0
  141. package/src/tools/testing.ts +0 -3
  142. package/src/tools/tests/CoValueCoreSubscription.test.ts +46 -12
  143. package/src/tools/tests/ContextManager.test.ts +85 -0
  144. package/src/tools/tests/SubscriptionCache.test.ts +237 -0
  145. package/src/tools/tests/account.test.ts +11 -4
  146. package/src/tools/tests/coMap.test.ts +5 -7
  147. package/src/tools/tests/schema.resolved.test.ts +3 -3
  148. package/tsup.config.ts +2 -0
  149. package/dist/chunk-2S3Z2CN6.js.map +0 -1
  150. package/dist/inspector/custom-element-P76EIWEV.js.map +0 -1
  151. package/dist/inspector/viewer/new-app.d.ts.map +0 -1
  152. package/dist/inspector/viewer/use-page-path.d.ts +0 -10
  153. package/dist/inspector/viewer/use-page-path.d.ts.map +0 -1
  154. package/src/inspector/viewer/new-app.tsx +0 -156
@@ -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 React9 = require_react();
1973
+ var React10 = 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 = React9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
2013
+ var ReactSharedInternals = React10.__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 React9 = require_react(), Internals = {
2167
+ var React10 = 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 = React9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
2185
+ }, REACT_PORTAL_TYPE = Symbol.for("react.portal"), ReactSharedInternals = React10.__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 React9 = require_react();
2393
+ var React10 = 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 = React9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
2581
+ var ReactSharedInternals = React10.__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 = React9.version;
13573
+ var isomorphicReactPackageVersion$jscomp$inline_1785 = React10.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 ? React9.Children.forEach(props.children, function(child) {
15024
+ null == props.value && ("object" === typeof props.children && null !== props.children ? React10.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(), 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");
28606
+ var Scheduler = require_scheduler(), React10 = 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 = 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({
28613
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React10.__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 = React9.version;
31327
+ var isomorphicReactPackageVersion = React10.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 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");
31723
+ var React10 = 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 = 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() {
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 = React10.__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
- React9 = {
31728
+ React10 = {
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 = React9["react-stack-bottom-frame"].bind(
31736
- React9,
31735
+ var unknownOwnerDebugStack = React10["react-stack-bottom-frame"].bind(
31736
+ React10,
31737
31737
  UnknownOwner
31738
31738
  )();
31739
31739
  var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
@@ -31782,20 +31782,100 @@ var require_jsx_runtime = __commonJS({
31782
31782
  });
31783
31783
 
31784
31784
  // src/inspector/custom-element.tsx
31785
- var import_react28 = __toESM(require_react(), 1);
31785
+ var import_react32 = __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
- // src/inspector/viewer/new-app.tsx
31791
- var import_react27 = __toESM(require_react(), 1);
31792
- import { styled as styled27 } from "goober";
31790
+ // src/inspector/in-app.tsx
31791
+ import { styled as styled29 } from "goober";
31793
31792
 
31794
- // src/inspector/ui/button.tsx
31795
- var import_react = __toESM(require_react(), 1);
31793
+ // src/inspector/viewer/page-stack.tsx
31794
+ import { styled as styled24 } from "goober";
31795
+
31796
+ // src/inspector/viewer/page.tsx
31797
+ var import_react21 = __toESM(require_react(), 1);
31798
+ import { styled as styled21 } from "goober";
31799
+
31800
+ // src/inspector/ui/badge.tsx
31796
31801
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
31797
31802
  import { styled } from "goober";
31798
- var StyledButton = styled("button")`
31803
+ var StyledBadge = styled("span")`
31804
+ font-size: 0.875rem;
31805
+ font-weight: 500;
31806
+ padding: 0.125rem 0.25rem;
31807
+ margin-left: -0.125rem;
31808
+ border-radius: var(--j-radius-sm);
31809
+ background-color: var(--j-foreground);
31810
+ display: inline-block;
31811
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
31812
+ color: var(--j-text-color-strong);
31813
+ `;
31814
+ function Badge({
31815
+ children,
31816
+ className
31817
+ }) {
31818
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledBadge, { className, children });
31819
+ }
31820
+
31821
+ // src/inspector/ui/heading.tsx
31822
+ var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
31823
+ import { styled as styled2 } from "goober";
31824
+ var StyledHeading = styled2("h1")`
31825
+ font-size: 1.125rem;
31826
+ text-align: center;
31827
+ font-weight: 500;
31828
+ color: var(--j-text-color-strong);
31829
+ `;
31830
+ function Heading({
31831
+ children,
31832
+ className,
31833
+ id
31834
+ }) {
31835
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledHeading, { className, id, children });
31836
+ }
31837
+
31838
+ // src/inspector/ui/text.tsx
31839
+ var import_react = __toESM(require_react(), 1);
31840
+ var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
31841
+ import { styled as styled3 } from "goober";
31842
+ var BaseText = import_react.default.forwardRef(
31843
+ ({ muted, strong, small, inline, mono, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref, ...rest })
31844
+ );
31845
+ var StyledText = styled3(BaseText)`
31846
+ ${(props) => props.muted && `
31847
+ color: var(--j-neutral-500);
31848
+ `}
31849
+
31850
+ ${(props) => props.strong && `
31851
+ font-weight: 500;
31852
+ color: var(--j-text-color-strong);
31853
+ `}
31854
+
31855
+ ${(props) => props.small && `
31856
+ font-size: 0.875rem;
31857
+ `}
31858
+
31859
+ ${(props) => props.inline && `
31860
+ display: inline;
31861
+ `}
31862
+
31863
+ ${(props) => props.mono && `
31864
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
31865
+ `}
31866
+ `;
31867
+ function Text(props) {
31868
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StyledText, { ...props });
31869
+ }
31870
+
31871
+ // src/inspector/viewer/account-or-group-text.tsx
31872
+ var import_react5 = __toESM(require_react(), 1);
31873
+
31874
+ // src/inspector/ui/button.tsx
31875
+ var import_react2 = __toESM(require_react(), 1);
31876
+ var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
31877
+ import { styled as styled4 } from "goober";
31878
+ var StyledButton = styled4("button")`
31799
31879
  display: inline-flex;
31800
31880
  align-items: center;
31801
31881
  justify-content: center;
@@ -31853,7 +31933,7 @@ var StyledButton = styled("button")`
31853
31933
  }
31854
31934
  }}
31855
31935
  `;
31856
- var Button = (0, import_react.forwardRef)(
31936
+ var Button = (0, import_react2.forwardRef)(
31857
31937
  ({
31858
31938
  className,
31859
31939
  children,
@@ -31862,7 +31942,7 @@ var Button = (0, import_react.forwardRef)(
31862
31942
  type = "button",
31863
31943
  ...buttonProps
31864
31944
  }, ref) => {
31865
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
31945
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
31866
31946
  StyledButton,
31867
31947
  {
31868
31948
  ref,
@@ -31877,181 +31957,14 @@ var Button = (0, import_react.forwardRef)(
31877
31957
  }
31878
31958
  );
31879
31959
 
31880
- // src/inspector/ui/input.tsx
31881
- var import_react2 = __toESM(require_react(), 1);
31882
- var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
31883
- import { styled as styled2 } from "goober";
31884
- var Container = styled2("div")`
31885
- display: grid;
31886
- gap: 0.25rem;
31887
- `;
31888
- var StyledInput = styled2("input")`
31889
- width: 100%;
31890
- border-radius: var(--j-radius-md);
31891
- border: 1px solid var(--j-border-color);
31892
- padding: 0.5rem 0.875rem;
31893
- box-shadow: var(--j-shadow-sm);
31894
- font-weight: 500;
31895
- background-color: white;
31896
- color: var(--j-text-color-strong);
31897
-
31898
- @media (prefers-color-scheme: dark) {
31899
- background-color: var(--j-foreground);
31900
- }
31901
- `;
31902
- var Input = (0, import_react2.forwardRef)(
31903
- ({ label, className, hideLabel, id: customId, ...inputProps }, ref) => {
31904
- const generatedId = (0, import_react2.useId)();
31905
- const id = customId || generatedId;
31906
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Container, { className, children: [
31907
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
31908
- "label",
31909
- {
31910
- htmlFor: id,
31911
- className: hideLabel ? "j-sr-only" : "",
31912
- style: { color: "var(--j-text-color)" },
31913
- children: label
31914
- }
31915
- ),
31916
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledInput, { ref, ...inputProps, id })
31917
- ] });
31918
- }
31919
- );
31920
-
31921
- // src/inspector/viewer/breadcrumbs.tsx
31922
- var import_react3 = __toESM(require_react(), 1);
31923
- import { styled as styled3 } from "goober";
31924
- var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
31925
- var BreadcrumbsContainer = styled3("div")`
31926
- position: relative;
31927
- z-index: 20;
31928
- flex: 1;
31929
- display: flex;
31930
- align-items: center;
31931
- `;
31932
- var Separator = styled3("span")`
31933
- padding: 0 0.125rem;
31934
- `;
31935
- var Breadcrumbs = ({
31936
- path,
31937
- onBreadcrumbClick
31938
- }) => {
31939
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(BreadcrumbsContainer, { children: [
31940
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
31941
- Button,
31942
- {
31943
- variant: "link",
31944
- style: { padding: "0 0.25rem" },
31945
- onClick: () => onBreadcrumbClick(-1),
31946
- children: "Home"
31947
- }
31948
- ),
31949
- path.map((page, index) => {
31950
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react3.default.Fragment, { children: [
31951
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Separator, { "aria-hidden": true, children: "/" }),
31952
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
31953
- Button,
31954
- {
31955
- variant: "link",
31956
- style: { padding: "0 0.25rem" },
31957
- onClick: () => onBreadcrumbClick(index),
31958
- children: index === 0 ? page.name || "Root" : page.name
31959
- }
31960
- )
31961
- ] }, page.coId);
31962
- })
31963
- ] });
31964
- };
31965
-
31966
- // src/inspector/viewer/page-stack.tsx
31967
- import { styled as styled24 } from "goober";
31968
-
31969
- // src/inspector/viewer/page.tsx
31970
- var import_react22 = __toESM(require_react(), 1);
31971
- import { styled as styled22 } from "goober";
31972
-
31973
- // src/inspector/ui/badge.tsx
31974
- var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
31975
- import { styled as styled4 } from "goober";
31976
- var StyledBadge = styled4("span")`
31977
- font-size: 0.875rem;
31978
- font-weight: 500;
31979
- padding: 0.125rem 0.25rem;
31980
- margin-left: -0.125rem;
31981
- border-radius: var(--j-radius-sm);
31982
- background-color: var(--j-foreground);
31983
- display: inline-block;
31984
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
31985
- color: var(--j-text-color-strong);
31986
- `;
31987
- function Badge({
31988
- children,
31989
- className
31990
- }) {
31991
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(StyledBadge, { className, children });
31992
- }
31993
-
31994
- // src/inspector/ui/heading.tsx
31995
- var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
31996
- import { styled as styled5 } from "goober";
31997
- var StyledHeading = styled5("h1")`
31998
- font-size: 1.125rem;
31999
- text-align: center;
32000
- font-weight: 500;
32001
- color: var(--j-text-color-strong);
32002
- `;
32003
- function Heading({
32004
- children,
32005
- className,
32006
- id
32007
- }) {
32008
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StyledHeading, { className, id, children });
32009
- }
32010
-
32011
- // src/inspector/ui/text.tsx
32012
- var import_react4 = __toESM(require_react(), 1);
32013
- var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
32014
- import { styled as styled6 } from "goober";
32015
- var BaseText = import_react4.default.forwardRef(
32016
- ({ muted, strong, small, inline, mono, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, ...rest })
32017
- );
32018
- var StyledText = styled6(BaseText)`
32019
- ${(props) => props.muted && `
32020
- color: var(--j-neutral-500);
32021
- `}
32022
-
32023
- ${(props) => props.strong && `
32024
- font-weight: 500;
32025
- color: var(--j-text-color-strong);
32026
- `}
32027
-
32028
- ${(props) => props.small && `
32029
- font-size: 0.875rem;
32030
- `}
32031
-
32032
- ${(props) => props.inline && `
32033
- display: inline;
32034
- `}
32035
-
32036
- ${(props) => props.mono && `
32037
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
32038
- `}
32039
- `;
32040
- function Text(props) {
32041
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StyledText, { ...props });
32042
- }
32043
-
32044
- // src/inspector/viewer/account-or-group-text.tsx
32045
- var import_react7 = __toESM(require_react(), 1);
32046
-
32047
31960
  // src/inspector/viewer/use-resolve-covalue.ts
32048
- var import_react6 = __toESM(require_react(), 1);
31961
+ var import_react4 = __toESM(require_react(), 1);
32049
31962
 
32050
31963
  // src/inspector/viewer/co-stream-view.tsx
32051
- var import_react5 = __toESM(require_react(), 1);
31964
+ var import_react3 = __toESM(require_react(), 1);
32052
31965
  import { base64URLtoBytes } from "cojson";
32053
- import { styled as styled7 } from "goober";
32054
- var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
31966
+ import { styled as styled5 } from "goober";
31967
+ var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
32055
31968
  function isBinaryStreamStart(item) {
32056
31969
  return typeof item === "object" && item !== null && "type" in item && item.type === "start";
32057
31970
  }
@@ -32146,23 +32059,23 @@ var BinaryDownloadButton = ({
32146
32059
  document.body.removeChild(link);
32147
32060
  URL.revokeObjectURL(url);
32148
32061
  };
32149
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Button, { variant: "secondary", onClick: downloadFile, children: [
32062
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Button, { variant: "secondary", onClick: downloadFile, children: [
32150
32063
  "\u2B07\uFE0F ",
32151
32064
  label
32152
32065
  ] });
32153
32066
  };
32154
- var LabelContentPairContainer = styled7("div")`
32067
+ var LabelContentPairContainer = styled5("div")`
32155
32068
  display: flex;
32156
32069
  flex-direction: column;
32157
32070
  gap: 0.375rem;
32158
32071
  `;
32159
- var BinaryStreamGrid = styled7("div")`
32072
+ var BinaryStreamGrid = styled5("div")`
32160
32073
  display: grid;
32161
32074
  grid-template-columns: repeat(3, 1fr);
32162
32075
  gap: 0.5rem;
32163
32076
  max-width: 48rem;
32164
32077
  `;
32165
- var ImagePreviewContainer = styled7("div")`
32078
+ var ImagePreviewContainer = styled5("div")`
32166
32079
  background-color: rgb(249 250 251);
32167
32080
  padding: 0.75rem;
32168
32081
  border-radius: var(--j-radius-md);
@@ -32170,12 +32083,12 @@ var ImagePreviewContainer = styled7("div")`
32170
32083
  background-color: rgb(28 25 23);
32171
32084
  }
32172
32085
  `;
32173
- var CoStreamGrid = styled7("div")`
32086
+ var CoStreamGrid = styled5("div")`
32174
32087
  display: grid;
32175
32088
  grid-template-columns: repeat(3, 1fr);
32176
32089
  gap: 0.5rem;
32177
32090
  `;
32178
- var CoStreamItemContainer = styled7("div")`
32091
+ var CoStreamItemContainer = styled5("div")`
32179
32092
  padding: 0.75rem;
32180
32093
  border-radius: var(--j-radius-lg);
32181
32094
  overflow: hidden;
@@ -32190,18 +32103,18 @@ var LabelContentPair = ({
32190
32103
  label,
32191
32104
  content
32192
32105
  }) => {
32193
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(LabelContentPairContainer, { children: [
32194
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: label }),
32195
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: content })
32106
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(LabelContentPairContainer, { children: [
32107
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: label }),
32108
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: content })
32196
32109
  ] });
32197
32110
  };
32198
32111
  function RenderCoBinaryStream({
32199
32112
  value,
32200
32113
  items
32201
32114
  }) {
32202
- const [file, setFile] = (0, import_react5.useState)(null);
32203
- const [isLoading, setIsLoading] = (0, import_react5.useState)(true);
32204
- (0, import_react5.useEffect)(() => {
32115
+ const [file, setFile] = (0, import_react3.useState)(null);
32116
+ const [isLoading, setIsLoading] = (0, import_react3.useState)(true);
32117
+ (0, import_react3.useEffect)(() => {
32205
32118
  getBlobFromCoStream({
32206
32119
  items,
32207
32120
  onlyFirstChunk: true
@@ -32218,35 +32131,35 @@ function RenderCoBinaryStream({
32218
32131
  }
32219
32132
  }).finally(() => setIsLoading(false));
32220
32133
  }, [items]);
32221
- if (!isLoading && !file) return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: "No blob" });
32222
- if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: "Loading..." });
32223
- if (!file) return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: "No blob" });
32134
+ if (!isLoading && !file) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: "No blob" });
32135
+ if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: "Loading..." });
32136
+ if (!file) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: "No blob" });
32224
32137
  const { blob, mimeType } = file;
32225
32138
  const sizeInKB = (file.totalSize || 0) / 1024;
32226
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
32227
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(BinaryStreamGrid, { children: [
32228
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
32139
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
32140
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(BinaryStreamGrid, { children: [
32141
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
32229
32142
  LabelContentPair,
32230
32143
  {
32231
32144
  label: "Mime Type",
32232
- content: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Badge, { children: mimeType || "No mime type" })
32145
+ content: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Badge, { children: mimeType || "No mime type" })
32233
32146
  }
32234
32147
  ),
32235
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
32148
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
32236
32149
  LabelContentPair,
32237
32150
  {
32238
32151
  label: "Size",
32239
- content: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
32152
+ content: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
32240
32153
  sizeInKB.toFixed(2),
32241
32154
  " KB"
32242
32155
  ] })
32243
32156
  }
32244
32157
  ),
32245
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
32158
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
32246
32159
  LabelContentPair,
32247
32160
  {
32248
32161
  label: "Download",
32249
- content: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
32162
+ content: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
32250
32163
  BinaryDownloadButton,
32251
32164
  {
32252
32165
  fileName: value.id.toString(),
@@ -32258,11 +32171,11 @@ function RenderCoBinaryStream({
32258
32171
  }
32259
32172
  )
32260
32173
  ] }),
32261
- mimeType === "image/png" || mimeType === "image/jpeg" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
32174
+ mimeType === "image/png" || mimeType === "image/jpeg" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
32262
32175
  LabelContentPair,
32263
32176
  {
32264
32177
  label: "Preview",
32265
- content: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ImagePreviewContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RenderBlobImage, { blob }) })
32178
+ content: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ImagePreviewContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RenderBlobImage, { blob }) })
32266
32179
  }
32267
32180
  ) : null
32268
32181
  ] });
@@ -32273,10 +32186,10 @@ function RenderCoStream({
32273
32186
  }) {
32274
32187
  const streamPerUser = Object.keys(value.items);
32275
32188
  const userCoIds = streamPerUser.map((stream) => stream.split("_session")[0]);
32276
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CoStreamGrid, { children: userCoIds.map((id, idx) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(CoStreamItemContainer, { children: [
32277
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AccountOrGroupText, { coId: id, node }),
32189
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CoStreamGrid, { children: userCoIds.map((id, idx) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(CoStreamItemContainer, { children: [
32190
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AccountOrGroupText, { coId: id, node }),
32278
32191
  value.items[streamPerUser[idx]]?.map(
32279
- (item) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
32192
+ (item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
32280
32193
  new Date(item.madeAt).toLocaleString(),
32281
32194
  " ",
32282
32195
  JSON.stringify(item.value)
@@ -32291,9 +32204,9 @@ function CoStreamView({
32291
32204
  const streamType = detectCoStreamType(value);
32292
32205
  if (streamType.type === "binary") {
32293
32206
  if (streamType.items === void 0) {
32294
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: "No binary stream" });
32207
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: "No binary stream" });
32295
32208
  }
32296
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
32209
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
32297
32210
  RenderCoBinaryStream,
32298
32211
  {
32299
32212
  value,
@@ -32302,14 +32215,14 @@ function CoStreamView({
32302
32215
  );
32303
32216
  }
32304
32217
  if (streamType.type === "coStream") {
32305
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RenderCoStream, { value, node });
32218
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RenderCoStream, { value, node });
32306
32219
  }
32307
- if (streamType.type === "unknown") return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: "Unknown stream type" });
32308
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: "Unknown stream type" });
32220
+ if (streamType.type === "unknown") return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: "Unknown stream type" });
32221
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: "Unknown stream type" });
32309
32222
  }
32310
32223
  function RenderBlobImage({ blob }) {
32311
32224
  const urlCreator = window.URL || window.webkitURL;
32312
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("img", { src: urlCreator.createObjectURL(blob) });
32225
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src: urlCreator.createObjectURL(blob) });
32313
32226
  }
32314
32227
 
32315
32228
  // src/inspector/viewer/use-resolve-covalue.ts
@@ -32382,8 +32295,8 @@ function subscribeToCoValue(coValueId, node, callback) {
32382
32295
  });
32383
32296
  }
32384
32297
  function useResolvedCoValue(coValueId, node) {
32385
- const [result, setResult] = (0, import_react6.useState)();
32386
- (0, import_react6.useEffect)(() => {
32298
+ const [result, setResult] = (0, import_react4.useState)();
32299
+ (0, import_react4.useEffect)(() => {
32387
32300
  let isMounted = true;
32388
32301
  const unsubscribe = subscribeToCoValue(coValueId, node, (newResult) => {
32389
32302
  if (isMounted) {
@@ -32403,8 +32316,8 @@ function useResolvedCoValue(coValueId, node) {
32403
32316
  };
32404
32317
  }
32405
32318
  function useResolvedCoValues(coValueIds, node) {
32406
- const [results, setResults] = (0, import_react6.useState)([]);
32407
- (0, import_react6.useEffect)(() => {
32319
+ const [results, setResults] = (0, import_react4.useState)([]);
32320
+ (0, import_react4.useEffect)(() => {
32408
32321
  let isMounted = true;
32409
32322
  const unsubscribes = [];
32410
32323
  coValueIds.forEach((coValueId, index) => {
@@ -32428,7 +32341,7 @@ function useResolvedCoValues(coValueIds, node) {
32428
32341
  }
32429
32342
 
32430
32343
  // src/inspector/viewer/account-or-group-text.tsx
32431
- var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
32344
+ var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
32432
32345
  function AccountOrGroupText({
32433
32346
  coId,
32434
32347
  node,
@@ -32436,8 +32349,8 @@ function AccountOrGroupText({
32436
32349
  onClick
32437
32350
  }) {
32438
32351
  const { snapshot, extendedType } = useResolvedCoValue(coId, node);
32439
- const [name, setName] = (0, import_react7.useState)(null);
32440
- (0, import_react7.useEffect)(() => {
32352
+ const [name, setName] = (0, import_react5.useState)(null);
32353
+ (0, import_react5.useEffect)(() => {
32441
32354
  if (snapshot && typeof snapshot === "object" && "profile" in snapshot) {
32442
32355
  const profileId = snapshot.profile;
32443
32356
  resolveCoValue(profileId, node).then((profileResult) => {
@@ -32447,32 +32360,32 @@ function AccountOrGroupText({
32447
32360
  });
32448
32361
  }
32449
32362
  }, [snapshot, node, extendedType]);
32450
- if (!snapshot) return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Loading..." });
32363
+ if (!snapshot) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "Loading..." });
32451
32364
  if (extendedType !== "account" && extendedType !== "group") {
32452
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "CoID is not an account or group" });
32365
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "CoID is not an account or group" });
32453
32366
  }
32454
32367
  const displayName = extendedType === "account" ? name || "Account" : "Group";
32455
32368
  const displayText = showId ? `${displayName} <${coId}>` : displayName;
32456
32369
  if (onClick) {
32457
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { variant: "link", onClick: () => onClick(displayName), children: displayText });
32370
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Button, { variant: "link", onClick: () => onClick(displayName), children: displayText });
32458
32371
  }
32459
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: displayText });
32372
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: displayText });
32460
32373
  }
32461
32374
 
32462
32375
  // src/inspector/viewer/grid-view.tsx
32463
- var import_react11 = __toESM(require_react(), 1);
32464
- import { styled as styled14 } from "goober";
32376
+ var import_react9 = __toESM(require_react(), 1);
32377
+ import { styled as styled12 } from "goober";
32465
32378
 
32466
32379
  // src/inspector/viewer/type-icon.tsx
32467
- import { styled as styled8 } from "goober";
32468
- var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
32469
- var IconText = styled8("span")`
32380
+ import { styled as styled6 } from "goober";
32381
+ var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
32382
+ var IconText = styled6("span")`
32470
32383
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
32471
32384
  `;
32472
- var UnavailableText = styled8("div")`
32385
+ var UnavailableText = styled6("div")`
32473
32386
  font-weight: 500;
32474
32387
  `;
32475
- var EmptySpace = styled8("div")`
32388
+ var EmptySpace = styled6("div")`
32476
32389
  white-space: pre;
32477
32390
  width: 3.5rem;
32478
32391
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
@@ -32494,7 +32407,7 @@ var TypeIcon = ({
32494
32407
  };
32495
32408
  const iconKey = extendedType || type;
32496
32409
  const icon2 = iconMap[iconKey];
32497
- return icon2 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconText, { children: icon2 }) : null;
32410
+ return icon2 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconText, { children: icon2 }) : null;
32498
32411
  };
32499
32412
  var ResolveIcon = ({
32500
32413
  coId,
@@ -32502,23 +32415,23 @@ var ResolveIcon = ({
32502
32415
  }) => {
32503
32416
  const { type, extendedType, snapshot } = useResolvedCoValue(coId, node);
32504
32417
  if (snapshot === "unavailable" && !type) {
32505
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(UnavailableText, { children: "Unavailable" });
32418
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(UnavailableText, { children: "Unavailable" });
32506
32419
  }
32507
- if (!type) return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(EmptySpace, { children: " " });
32508
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TypeIcon, { type, extendedType });
32420
+ if (!type) return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(EmptySpace, { children: " " });
32421
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TypeIcon, { type, extendedType });
32509
32422
  };
32510
32423
 
32511
32424
  // src/inspector/viewer/types.ts
32512
32425
  var isCoId = (coId) => typeof coId === "string" && coId.startsWith("co_") && !coId.includes("inviteSecret");
32513
32426
 
32514
32427
  // src/inspector/viewer/value-renderer.tsx
32515
- var import_react8 = __toESM(require_react(), 1);
32516
- import { styled as styled9 } from "goober";
32428
+ var import_react6 = __toESM(require_react(), 1);
32429
+ import { styled as styled7 } from "goober";
32517
32430
 
32518
32431
  // src/inspector/ui/icons/caution.tsx
32519
- var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
32432
+ var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
32520
32433
  function CautionIcon(props) {
32521
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
32434
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
32522
32435
  "svg",
32523
32436
  {
32524
32437
  ...props,
@@ -32530,18 +32443,18 @@ function CautionIcon(props) {
32530
32443
  stroke: "currentColor",
32531
32444
  strokeLinejoin: "round",
32532
32445
  children: [
32533
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "12", cy: "12", r: "12", fill: "currentColor" }),
32534
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { x: "10.5", y: "6", width: "3", height: "7.5", rx: "1.5", fill: "#fff" }),
32535
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { x: "10.5", y: "16.5", width: "3", height: "3", rx: "1.5", fill: "#fff" })
32446
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "12", cy: "12", r: "12", fill: "currentColor" }),
32447
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { x: "10.5", y: "6", width: "3", height: "7.5", rx: "1.5", fill: "#fff" }),
32448
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { x: "10.5", y: "16.5", width: "3", height: "3", rx: "1.5", fill: "#fff" })
32536
32449
  ]
32537
32450
  }
32538
32451
  );
32539
32452
  }
32540
32453
 
32541
32454
  // src/inspector/ui/icons/chevron-down-icon.tsx
32542
- var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
32455
+ var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
32543
32456
  function ChevronDownIcon(props) {
32544
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
32457
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
32545
32458
  "svg",
32546
32459
  {
32547
32460
  ...props,
@@ -32552,15 +32465,15 @@ function ChevronDownIcon(props) {
32552
32465
  fill: "none",
32553
32466
  stroke: "currentColor",
32554
32467
  strokeLinejoin: "round",
32555
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "m6 9 6 6 6-6" })
32468
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m6 9 6 6 6-6" })
32556
32469
  }
32557
32470
  );
32558
32471
  }
32559
32472
 
32560
32473
  // src/inspector/ui/icons/delete-icon.tsx
32561
- var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
32474
+ var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
32562
32475
  function DeleteIcon(props) {
32563
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
32476
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
32564
32477
  "svg",
32565
32478
  {
32566
32479
  ...props,
@@ -32573,18 +32486,18 @@ function DeleteIcon(props) {
32573
32486
  strokeLinejoin: "round",
32574
32487
  className: "lucide lucide-trash-icon lucide-trash",
32575
32488
  children: [
32576
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M3 6h18" }),
32577
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
32578
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
32489
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M3 6h18" }),
32490
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
32491
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
32579
32492
  ]
32580
32493
  }
32581
32494
  );
32582
32495
  }
32583
32496
 
32584
32497
  // src/inspector/ui/icons/edit-icon.tsx
32585
- var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
32498
+ var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
32586
32499
  function EditIcon(props) {
32587
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
32500
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
32588
32501
  "svg",
32589
32502
  {
32590
32503
  ...props,
@@ -32596,15 +32509,15 @@ function EditIcon(props) {
32596
32509
  stroke: "currentColor",
32597
32510
  strokeLinejoin: "round",
32598
32511
  className: "lucide lucide-edit lucide-pencil",
32599
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M13.2942 7.95881C13.5533 7.63559 13.5013 7.16358 13.178 6.90453C12.8548 6.64549 12.3828 6.6975 12.1238 7.02072L13.2942 7.95881ZM6.811 14.8488L7.37903 15.3385C7.38489 15.3317 7.39062 15.3248 7.39623 15.3178L6.811 14.8488ZM6.64 15.2668L5.89146 15.2179L5.8908 15.2321L6.64 15.2668ZM6.5 18.2898L5.7508 18.2551C5.74908 18.2923 5.75013 18.3296 5.75396 18.3667L6.5 18.2898ZM7.287 18.9768L7.31152 19.7264C7.36154 19.7247 7.41126 19.7181 7.45996 19.7065L7.287 18.9768ZM10.287 18.2658L10.46 18.9956L10.4716 18.9927L10.287 18.2658ZM10.672 18.0218L11.2506 18.4991L11.2571 18.491L10.672 18.0218ZM17.2971 10.959C17.5562 10.6358 17.5043 10.1638 17.1812 9.90466C16.8581 9.64552 16.386 9.69742 16.1269 10.0206L17.2971 10.959ZM12.1269 7.02052C11.8678 7.34365 11.9196 7.81568 12.2428 8.07484C12.5659 8.33399 13.0379 8.28213 13.2971 7.95901L12.1269 7.02052ZM14.3 5.50976L14.8851 5.97901C14.8949 5.96672 14.9044 5.95412 14.9135 5.94123L14.3 5.50976ZM15.929 5.18976L16.4088 4.61332C16.3849 4.59344 16.3598 4.57507 16.3337 4.5583L15.929 5.18976ZM18.166 7.05176L18.6968 6.52192C18.6805 6.50561 18.6635 6.49007 18.6458 6.47532L18.166 7.05176ZM18.5029 7.87264L19.2529 7.87676V7.87676L18.5029 7.87264ZM18.157 8.68976L17.632 8.15412C17.6108 8.17496 17.5908 8.19704 17.5721 8.22025L18.157 8.68976ZM16.1271 10.0203C15.8678 10.3433 15.9195 10.8153 16.2425 11.0746C16.5655 11.3339 17.0376 11.2823 17.2969 10.9593L16.1271 10.0203ZM13.4537 7.37862C13.3923 6.96898 13.0105 6.68666 12.6009 6.74805C12.1912 6.80943 11.9089 7.19127 11.9703 7.60091L13.4537 7.37862ZM16.813 11.2329C17.2234 11.1772 17.5109 10.7992 17.4552 10.3888C17.3994 9.97834 17.0215 9.69082 16.611 9.74659L16.813 11.2329ZM12.1238 7.02072L6.22577 14.3797L7.39623 15.3178L13.2942 7.95881L12.1238 7.02072ZM6.24297 14.359C6.03561 14.5995 5.91226 14.9011 5.89159 15.218L7.38841 15.3156C7.38786 15.324 7.38457 15.3321 7.37903 15.3385L6.24297 14.359ZM5.8908 15.2321L5.7508 18.2551L7.2492 18.3245L7.3892 15.3015L5.8908 15.2321ZM5.75396 18.3667C5.83563 19.1586 6.51588 19.7524 7.31152 19.7264L7.26248 18.2272C7.25928 18.2273 7.25771 18.2268 7.25669 18.2264C7.25526 18.2259 7.25337 18.2249 7.25144 18.2232C7.2495 18.2215 7.24825 18.2198 7.24754 18.2185C7.24703 18.2175 7.24637 18.216 7.24604 18.2128L5.75396 18.3667ZM7.45996 19.7065L10.46 18.9955L10.114 17.536L7.11404 18.247L7.45996 19.7065ZM10.4716 18.9927C10.7771 18.9151 11.05 18.7422 11.2506 18.499L10.0934 17.5445C10.0958 17.5417 10.0989 17.5397 10.1024 17.5388L10.4716 18.9927ZM11.2571 18.491L17.2971 10.959L16.1269 10.0206L10.0869 17.5526L11.2571 18.491ZM13.2971 7.95901L14.8851 5.97901L13.7149 5.04052L12.1269 7.02052L13.2971 7.95901ZM14.9135 5.94123C15.0521 5.74411 15.3214 5.6912 15.5243 5.82123L16.3337 4.5583C15.4544 3.99484 14.2873 4.2241 13.6865 5.0783L14.9135 5.94123ZM15.4492 5.7662L17.6862 7.6282L18.6458 6.47532L16.4088 4.61332L15.4492 5.7662ZM17.6352 7.58161C17.7111 7.6577 17.7535 7.761 17.7529 7.86852L19.2529 7.87676C19.2557 7.36905 19.0555 6.88127 18.6968 6.52192L17.6352 7.58161ZM17.7529 7.86852C17.7524 7.97604 17.7088 8.07886 17.632 8.15412L18.682 9.22541C19.0446 8.87002 19.2501 8.38447 19.2529 7.87676L17.7529 7.86852ZM17.5721 8.22025L16.1271 10.0203L17.2969 10.9593L18.7419 9.15928L17.5721 8.22025ZM11.9703 7.60091C12.3196 9.93221 14.4771 11.5503 16.813 11.2329L16.611 9.74659C15.0881 9.95352 13.6815 8.89855 13.4537 7.37862L11.9703 7.60091Z" })
32512
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M13.2942 7.95881C13.5533 7.63559 13.5013 7.16358 13.178 6.90453C12.8548 6.64549 12.3828 6.6975 12.1238 7.02072L13.2942 7.95881ZM6.811 14.8488L7.37903 15.3385C7.38489 15.3317 7.39062 15.3248 7.39623 15.3178L6.811 14.8488ZM6.64 15.2668L5.89146 15.2179L5.8908 15.2321L6.64 15.2668ZM6.5 18.2898L5.7508 18.2551C5.74908 18.2923 5.75013 18.3296 5.75396 18.3667L6.5 18.2898ZM7.287 18.9768L7.31152 19.7264C7.36154 19.7247 7.41126 19.7181 7.45996 19.7065L7.287 18.9768ZM10.287 18.2658L10.46 18.9956L10.4716 18.9927L10.287 18.2658ZM10.672 18.0218L11.2506 18.4991L11.2571 18.491L10.672 18.0218ZM17.2971 10.959C17.5562 10.6358 17.5043 10.1638 17.1812 9.90466C16.8581 9.64552 16.386 9.69742 16.1269 10.0206L17.2971 10.959ZM12.1269 7.02052C11.8678 7.34365 11.9196 7.81568 12.2428 8.07484C12.5659 8.33399 13.0379 8.28213 13.2971 7.95901L12.1269 7.02052ZM14.3 5.50976L14.8851 5.97901C14.8949 5.96672 14.9044 5.95412 14.9135 5.94123L14.3 5.50976ZM15.929 5.18976L16.4088 4.61332C16.3849 4.59344 16.3598 4.57507 16.3337 4.5583L15.929 5.18976ZM18.166 7.05176L18.6968 6.52192C18.6805 6.50561 18.6635 6.49007 18.6458 6.47532L18.166 7.05176ZM18.5029 7.87264L19.2529 7.87676V7.87676L18.5029 7.87264ZM18.157 8.68976L17.632 8.15412C17.6108 8.17496 17.5908 8.19704 17.5721 8.22025L18.157 8.68976ZM16.1271 10.0203C15.8678 10.3433 15.9195 10.8153 16.2425 11.0746C16.5655 11.3339 17.0376 11.2823 17.2969 10.9593L16.1271 10.0203ZM13.4537 7.37862C13.3923 6.96898 13.0105 6.68666 12.6009 6.74805C12.1912 6.80943 11.9089 7.19127 11.9703 7.60091L13.4537 7.37862ZM16.813 11.2329C17.2234 11.1772 17.5109 10.7992 17.4552 10.3888C17.3994 9.97834 17.0215 9.69082 16.611 9.74659L16.813 11.2329ZM12.1238 7.02072L6.22577 14.3797L7.39623 15.3178L13.2942 7.95881L12.1238 7.02072ZM6.24297 14.359C6.03561 14.5995 5.91226 14.9011 5.89159 15.218L7.38841 15.3156C7.38786 15.324 7.38457 15.3321 7.37903 15.3385L6.24297 14.359ZM5.8908 15.2321L5.7508 18.2551L7.2492 18.3245L7.3892 15.3015L5.8908 15.2321ZM5.75396 18.3667C5.83563 19.1586 6.51588 19.7524 7.31152 19.7264L7.26248 18.2272C7.25928 18.2273 7.25771 18.2268 7.25669 18.2264C7.25526 18.2259 7.25337 18.2249 7.25144 18.2232C7.2495 18.2215 7.24825 18.2198 7.24754 18.2185C7.24703 18.2175 7.24637 18.216 7.24604 18.2128L5.75396 18.3667ZM7.45996 19.7065L10.46 18.9955L10.114 17.536L7.11404 18.247L7.45996 19.7065ZM10.4716 18.9927C10.7771 18.9151 11.05 18.7422 11.2506 18.499L10.0934 17.5445C10.0958 17.5417 10.0989 17.5397 10.1024 17.5388L10.4716 18.9927ZM11.2571 18.491L17.2971 10.959L16.1269 10.0206L10.0869 17.5526L11.2571 18.491ZM13.2971 7.95901L14.8851 5.97901L13.7149 5.04052L12.1269 7.02052L13.2971 7.95901ZM14.9135 5.94123C15.0521 5.74411 15.3214 5.6912 15.5243 5.82123L16.3337 4.5583C15.4544 3.99484 14.2873 4.2241 13.6865 5.0783L14.9135 5.94123ZM15.4492 5.7662L17.6862 7.6282L18.6458 6.47532L16.4088 4.61332L15.4492 5.7662ZM17.6352 7.58161C17.7111 7.6577 17.7535 7.761 17.7529 7.86852L19.2529 7.87676C19.2557 7.36905 19.0555 6.88127 18.6968 6.52192L17.6352 7.58161ZM17.7529 7.86852C17.7524 7.97604 17.7088 8.07886 17.632 8.15412L18.682 9.22541C19.0446 8.87002 19.2501 8.38447 19.2529 7.87676L17.7529 7.86852ZM17.5721 8.22025L16.1271 10.0203L17.2969 10.9593L18.7419 9.15928L17.5721 8.22025ZM11.9703 7.60091C12.3196 9.93221 14.4771 11.5503 16.813 11.2329L16.611 9.74659C15.0881 9.95352 13.6815 8.89855 13.4537 7.37862L11.9703 7.60091Z" })
32600
32513
  }
32601
32514
  );
32602
32515
  }
32603
32516
 
32604
32517
  // src/inspector/ui/icons/link-icon.tsx
32605
- var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
32518
+ var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
32606
32519
  function LinkIcon(props) {
32607
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
32520
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
32608
32521
  "svg",
32609
32522
  {
32610
32523
  xmlns: "http://www.w3.org/2000/svg",
@@ -32613,7 +32526,7 @@ function LinkIcon(props) {
32613
32526
  strokeWidth: 1.5,
32614
32527
  stroke: "currentColor",
32615
32528
  ...props,
32616
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
32529
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
32617
32530
  "path",
32618
32531
  {
32619
32532
  strokeLinecap: "round",
@@ -32626,9 +32539,9 @@ function LinkIcon(props) {
32626
32539
  }
32627
32540
 
32628
32541
  // src/inspector/ui/icons/history.tsx
32629
- var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
32542
+ var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
32630
32543
  function HistoryIcon(props) {
32631
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
32544
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
32632
32545
  "svg",
32633
32546
  {
32634
32547
  ...props,
@@ -32641,7 +32554,7 @@ function HistoryIcon(props) {
32641
32554
  strokeLinejoin: "round",
32642
32555
  className: "lucide lucide-trash-icon lucide-trash",
32643
32556
  children: [
32644
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
32557
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
32645
32558
  "path",
32646
32559
  {
32647
32560
  d: "M5.52786 16.7023C6.6602 18.2608 8.3169 19.3584 10.1936 19.7934C12.0703 20.2284 14.0409 19.9716 15.7434 19.0701C17.446 18.1687 18.766 16.6832 19.4611 14.8865C20.1562 13.0898 20.1796 11.1027 19.527 9.29011C18.8745 7.47756 17.5898 5.96135 15.909 5.02005C14.2282 4.07875 12.2641 3.77558 10.3777 4.16623C8.49129 4.55689 6.80919 5.61514 5.64045 7.14656C4.47171 8.67797 3.89482 10.5797 4.01579 12.5023M4.01579 12.5023L2.51579 11.0023M4.01579 12.5023L5.51579 11.0023",
@@ -32650,7 +32563,7 @@ function HistoryIcon(props) {
32650
32563
  strokeLinejoin: "round"
32651
32564
  }
32652
32565
  ),
32653
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
32566
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
32654
32567
  "path",
32655
32568
  {
32656
32569
  d: "M12 8V12L15 15",
@@ -32665,9 +32578,9 @@ function HistoryIcon(props) {
32665
32578
  }
32666
32579
 
32667
32580
  // src/inspector/ui/icons/add-icon.tsx
32668
- var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
32581
+ var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
32669
32582
  function AddIcon(props) {
32670
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
32583
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
32671
32584
  "svg",
32672
32585
  {
32673
32586
  ...props,
@@ -32678,7 +32591,7 @@ function AddIcon(props) {
32678
32591
  fill: "none",
32679
32592
  stroke: "currentColor",
32680
32593
  strokeLinejoin: "round",
32681
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
32594
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
32682
32595
  "path",
32683
32596
  {
32684
32597
  d: "M4 12H20M12 4V20",
@@ -32692,7 +32605,7 @@ function AddIcon(props) {
32692
32605
  }
32693
32606
 
32694
32607
  // src/inspector/ui/icon.tsx
32695
- var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
32608
+ var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
32696
32609
  var icons = {
32697
32610
  caution: CautionIcon,
32698
32611
  chevronDown: ChevronDownIcon,
@@ -32744,7 +32657,7 @@ function Icon({
32744
32657
  throw new Error(`Icon not found: ${name}`);
32745
32658
  }
32746
32659
  const IconComponent = icons?.hasOwnProperty(name) ? icons[name] : icon;
32747
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
32660
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
32748
32661
  IconComponent,
32749
32662
  {
32750
32663
  "aria-hidden": "true",
@@ -32757,13 +32670,13 @@ function Icon({
32757
32670
  }
32758
32671
 
32759
32672
  // src/inspector/viewer/value-renderer.tsx
32760
- var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
32761
- var LinkContainer = styled9("span")`
32673
+ var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
32674
+ var LinkContainer = styled7("span")`
32762
32675
  display: inline-flex;
32763
32676
  gap: 0.25rem;
32764
32677
  align-items: center;
32765
32678
  `;
32766
- var BooleanText = styled9("span")`
32679
+ var BooleanText = styled7("span")`
32767
32680
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
32768
32681
  ${(props) => props.value ? `
32769
32682
  color: var(--j-success-color);
@@ -32771,45 +32684,45 @@ var BooleanText = styled9("span")`
32771
32684
  color: var(--j-destructive-color);
32772
32685
  `}
32773
32686
  `;
32774
- var ObjectContent = styled9("pre")`
32687
+ var ObjectContent = styled7("pre")`
32775
32688
  margin-top: 0.375rem;
32776
32689
  font-size: 0.875rem;
32777
32690
  white-space: pre-wrap;
32778
32691
  `;
32779
- var PreviewContainer = styled9("div")`
32692
+ var PreviewContainer = styled7("div")`
32780
32693
  font-size: 0.875rem;
32781
32694
  display: flex;
32782
32695
  flex-direction: column;
32783
32696
  gap: 0.5rem;
32784
32697
  align-items: flex-start;
32785
32698
  `;
32786
- var PreviewGrid = styled9("div")`
32699
+ var PreviewGrid = styled7("div")`
32787
32700
  display: grid;
32788
32701
  grid-template-columns: auto 1fr;
32789
32702
  gap: 0.5rem;
32790
32703
  `;
32791
- var PreviewMoreText = styled9(Text)`
32704
+ var PreviewMoreText = styled7(Text)`
32792
32705
  text-align: left;
32793
32706
  margin-top: 0.5rem;
32794
32707
  `;
32795
- var ImagePreviewContainer2 = styled9("div")`
32708
+ var ImagePreviewContainer2 = styled7("div")`
32796
32709
  display: flex;
32797
32710
  flex-direction: column;
32798
32711
  align-items: flex-start;
32799
32712
  `;
32800
- var PreviewImage = styled9("img")`
32713
+ var PreviewImage = styled7("img")`
32801
32714
  width: 2rem;
32802
32715
  height: 2rem;
32803
32716
  border: 2px solid white;
32804
32717
  box-shadow: var(--j-shadow-sm);
32805
32718
  margin: 0.5rem 0;
32806
32719
  `;
32807
- var RecordText = styled9("div")`
32720
+ var RecordText = styled7("div")`
32808
32721
  display: flex;
32809
32722
  align-items: center;
32810
32723
  gap: 0.25rem;
32811
32724
  `;
32812
- var ListText = styled9("div")`
32725
+ var ListText = styled7("div")`
32813
32726
  display: flex;
32814
32727
  align-items: center;
32815
32728
  gap: 0.25rem;
@@ -32819,20 +32732,20 @@ function ValueRenderer({
32819
32732
  onCoIDClick,
32820
32733
  compact
32821
32734
  }) {
32822
- const [isExpanded, setIsExpanded] = (0, import_react8.useState)(false);
32735
+ const [isExpanded, setIsExpanded] = (0, import_react6.useState)(false);
32823
32736
  if (typeof json === "undefined" || json === void 0) {
32824
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { muted: true, children: "undefined" });
32737
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { muted: true, children: "undefined" });
32825
32738
  }
32826
32739
  if (json === null) {
32827
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { muted: true, children: "null" });
32740
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { muted: true, children: "null" });
32828
32741
  }
32829
32742
  if (typeof json === "string" && isCoId(json)) {
32830
- const content = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
32743
+ const content = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
32831
32744
  json,
32832
- onCoIDClick && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { name: "link" })
32745
+ onCoIDClick && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { name: "link" })
32833
32746
  ] });
32834
32747
  if (onCoIDClick) {
32835
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
32748
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
32836
32749
  Button,
32837
32750
  {
32838
32751
  variant: "link",
@@ -32843,35 +32756,35 @@ function ValueRenderer({
32843
32756
  }
32844
32757
  );
32845
32758
  }
32846
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LinkContainer, { children: content });
32759
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(LinkContainer, { children: content });
32847
32760
  }
32848
32761
  if (typeof json === "string") {
32849
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { children: json });
32762
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { children: json });
32850
32763
  }
32851
32764
  if (typeof json === "number") {
32852
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { mono: true, children: json });
32765
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { mono: true, children: json });
32853
32766
  }
32854
32767
  if (typeof json === "boolean") {
32855
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BooleanText, { value: json, children: json.toString() });
32768
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BooleanText, { value: json, children: json.toString() });
32856
32769
  }
32857
32770
  const longJson = JSON.stringify(json, null, 2);
32858
32771
  const shortJson = longJson.split("\n").slice(0, compact ? 3 : 8).join("\n");
32859
32772
  const hasDifference = longJson !== shortJson;
32860
32773
  if (typeof json === "object") {
32861
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
32862
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: Array.isArray(json) ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
32774
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
32775
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: Array.isArray(json) ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
32863
32776
  "Array (",
32864
32777
  json.length,
32865
32778
  ")"
32866
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: "Object" }) }),
32867
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ObjectContent, { children: [
32779
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: "Object" }) }),
32780
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ObjectContent, { children: [
32868
32781
  isExpanded ? longJson : shortJson,
32869
32782
  hasDifference && !isExpanded ? "\n ..." : null
32870
32783
  ] }),
32871
- !compact && hasDifference ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant: "link", onClick: () => setIsExpanded(!isExpanded), children: isExpanded ? "Show less" : "Show more" }) : null
32784
+ !compact && hasDifference ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button, { variant: "link", onClick: () => setIsExpanded(!isExpanded), children: isExpanded ? "Show less" : "Show more" }) : null
32872
32785
  ] });
32873
32786
  }
32874
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: String(json) });
32787
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: String(json) });
32875
32788
  }
32876
32789
  var CoMapPreview = ({
32877
32790
  coId,
@@ -32883,7 +32796,7 @@ var CoMapPreview = ({
32883
32796
  node
32884
32797
  );
32885
32798
  if (!snapshot) {
32886
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
32799
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
32887
32800
  "div",
32888
32801
  {
32889
32802
  style: {
@@ -32898,15 +32811,15 @@ var CoMapPreview = ({
32898
32811
  );
32899
32812
  }
32900
32813
  if (snapshot === "unavailable" && !value) {
32901
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { inline: true, muted: true, children: "Unavailable" });
32814
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Text, { inline: true, muted: true, children: "Unavailable" });
32902
32815
  }
32903
32816
  if (type === "coplaintext") {
32904
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: value.toString() });
32817
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: value.toString() });
32905
32818
  }
32906
32819
  if (extendedType === "image" && isBrowserImage(snapshot)) {
32907
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ImagePreviewContainer2, { children: [
32908
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PreviewImage, { src: snapshot.placeholderDataURL }),
32909
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { inline: true, small: true, muted: true, children: [
32820
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ImagePreviewContainer2, { children: [
32821
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PreviewImage, { src: snapshot.placeholderDataURL }),
32822
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text, { inline: true, small: true, muted: true, children: [
32910
32823
  snapshot.originalSize[0],
32911
32824
  " x ",
32912
32825
  snapshot.originalSize[1]
@@ -32914,10 +32827,10 @@ var CoMapPreview = ({
32914
32827
  ] });
32915
32828
  }
32916
32829
  if (extendedType === "record") {
32917
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(RecordText, { children: [
32830
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(RecordText, { children: [
32918
32831
  "Record",
32919
32832
  " ",
32920
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { inline: true, muted: true, children: [
32833
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text, { inline: true, muted: true, children: [
32921
32834
  "(",
32922
32835
  Object.keys(snapshot).length,
32923
32836
  ")"
@@ -32925,10 +32838,10 @@ var CoMapPreview = ({
32925
32838
  ] });
32926
32839
  }
32927
32840
  if (type === "colist") {
32928
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ListText, { children: [
32841
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ListText, { children: [
32929
32842
  "List",
32930
32843
  " ",
32931
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { inline: true, muted: true, children: [
32844
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text, { inline: true, muted: true, children: [
32932
32845
  "(",
32933
32846
  snapshot.length,
32934
32847
  ")"
@@ -32939,15 +32852,15 @@ var CoMapPreview = ({
32939
32852
  const limitedProperties = extendedType === "account" ? properties.filter(
32940
32853
  ([key]) => !key.startsWith("key_z") && !key.startsWith("sealer_z") && key !== "readKey"
32941
32854
  ).slice(0, limit) : properties.slice(0, limit);
32942
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(PreviewContainer, { children: [
32943
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PreviewGrid, { children: limitedProperties.map(([key, value2]) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react8.default.Fragment, { children: [
32944
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { strong: true, children: [
32855
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(PreviewContainer, { children: [
32856
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(PreviewGrid, { children: limitedProperties.map(([key, value2]) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react6.default.Fragment, { children: [
32857
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Text, { strong: true, children: [
32945
32858
  key,
32946
32859
  ": "
32947
32860
  ] }),
32948
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ValueRenderer, { compact: true, json: value2 })
32861
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ValueRenderer, { compact: true, json: value2 })
32949
32862
  ] }, key)) }),
32950
- properties.length > limit && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(PreviewMoreText, { muted: true, small: true, children: [
32863
+ properties.length > limit && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(PreviewMoreText, { muted: true, small: true, children: [
32951
32864
  properties.length - limit,
32952
32865
  " more"
32953
32866
  ] })
@@ -32955,23 +32868,23 @@ var CoMapPreview = ({
32955
32868
  };
32956
32869
 
32957
32870
  // src/inspector/viewer/co-value-editor.tsx
32958
- var import_react10 = __toESM(require_react(), 1);
32959
- import { styled as styled11 } from "goober";
32871
+ var import_react8 = __toESM(require_react(), 1);
32872
+ import { styled as styled9 } from "goober";
32960
32873
 
32961
32874
  // src/inspector/ui/select.tsx
32962
- var import_react9 = __toESM(require_react(), 1);
32963
- import { styled as styled10 } from "goober";
32964
- var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
32965
- var SelectContainer = styled10("div")`
32875
+ var import_react7 = __toESM(require_react(), 1);
32876
+ import { styled as styled8 } from "goober";
32877
+ var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
32878
+ var SelectContainer = styled8("div")`
32966
32879
  display: grid;
32967
32880
  gap: 0.25rem;
32968
32881
  `;
32969
- var SelectWrapper = styled10("div")`
32882
+ var SelectWrapper = styled8("div")`
32970
32883
  position: relative;
32971
32884
  display: flex;
32972
32885
  align-items: center;
32973
32886
  `;
32974
- var StyledSelect = styled10("select")`
32887
+ var StyledSelect = styled8("select")`
32975
32888
  width: 100%;
32976
32889
  border-radius: var(--j-radius-md);
32977
32890
  border: 1px solid var(--j-border-color);
@@ -32989,7 +32902,7 @@ var StyledSelect = styled10("select")`
32989
32902
  background-color: var(--j-foreground);
32990
32903
  }
32991
32904
  `;
32992
- var SelectIcon = styled10("span")`
32905
+ var SelectIcon = styled8("span")`
32993
32906
  position: absolute;
32994
32907
  right: 0.5em;
32995
32908
  color: var(--j-neutral-400);
@@ -33001,19 +32914,19 @@ var SelectIcon = styled10("span")`
33001
32914
  `;
33002
32915
  function Select(props) {
33003
32916
  const { label, hideLabel, id: customId, className, ...selectProps } = props;
33004
- const generatedId = (0, import_react9.useId)();
32917
+ const generatedId = (0, import_react7.useId)();
33005
32918
  const id = customId || generatedId;
33006
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(SelectContainer, { className, children: [
33007
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: id, className: hideLabel ? "j-sr-only" : "", children: label }),
33008
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(SelectWrapper, { children: [
33009
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StyledSelect, { ...selectProps, id, children: props.children }),
33010
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SelectIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: "chevronDown", size: "sm" }) })
32919
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(SelectContainer, { className, children: [
32920
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: id, className: hideLabel ? "j-sr-only" : "", children: label }),
32921
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(SelectWrapper, { children: [
32922
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StyledSelect, { ...selectProps, id, children: props.children }),
32923
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "chevronDown", size: "sm" }) })
33011
32924
  ] })
33012
32925
  ] });
33013
32926
  }
33014
32927
 
33015
32928
  // src/inspector/viewer/co-value-editor.tsx
33016
- var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
32929
+ var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
33017
32930
  function CoValueEditor({
33018
32931
  node,
33019
32932
  property,
@@ -33030,8 +32943,8 @@ function CoValueEditor({
33030
32943
  if (typeof value === "object") return "object";
33031
32944
  return "undefined";
33032
32945
  };
33033
- const [selectedType, setSelectedType] = (0, import_react10.useState)(getInitialType());
33034
- const [editValue, setEditValue] = (0, import_react10.useState)(
32946
+ const [selectedType, setSelectedType] = (0, import_react8.useState)(getInitialType());
32947
+ const [editValue, setEditValue] = (0, import_react8.useState)(
33035
32948
  value === void 0 || value === null ? "" : typeof value === "object" ? JSON.stringify(value, null, 2) : String(value)
33036
32949
  );
33037
32950
  const handleSubmit = (e) => {
@@ -33076,8 +32989,8 @@ function CoValueEditor({
33076
32989
  onCancel();
33077
32990
  };
33078
32991
  const showTextarea = selectedType === "number" || selectedType === "string" || selectedType === "object";
33079
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(EditForm, { onSubmit: handleSubmit, children: [
33080
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
32992
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(EditForm, { onSubmit: handleSubmit, children: [
32993
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
33081
32994
  Select,
33082
32995
  {
33083
32996
  label: "Type",
@@ -33087,17 +33000,17 @@ function CoValueEditor({
33087
33000
  },
33088
33001
  onClick: (e) => e.stopPropagation(),
33089
33002
  children: [
33090
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "number", children: "number" }),
33091
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "string", children: "string" }),
33092
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "true", children: "true" }),
33093
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "false", children: "false" }),
33094
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "object", children: "object" }),
33095
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "null", children: "null" }),
33096
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "undefined", children: "undefined" })
33003
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "number", children: "number" }),
33004
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "string", children: "string" }),
33005
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "true", children: "true" }),
33006
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "false", children: "false" }),
33007
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "object", children: "object" }),
33008
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "null", children: "null" }),
33009
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { value: "undefined", children: "undefined" })
33097
33010
  ]
33098
33011
  }
33099
33012
  ),
33100
- showTextarea && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
33013
+ showTextarea && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
33101
33014
  StyledTextarea,
33102
33015
  {
33103
33016
  value: editValue,
@@ -33105,18 +33018,18 @@ function CoValueEditor({
33105
33018
  onClick: (e) => e.stopPropagation()
33106
33019
  }
33107
33020
  ),
33108
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(FormActions, { children: [
33109
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { type: "button", variant: "secondary", onClick: onCancel, children: "Cancel" }),
33110
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { type: "submit", variant: "primary", children: "Submit" })
33021
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FormActions, { children: [
33022
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { type: "button", variant: "secondary", onClick: onCancel, children: "Cancel" }),
33023
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { type: "submit", variant: "primary", children: "Submit" })
33111
33024
  ] })
33112
33025
  ] });
33113
33026
  }
33114
- var EditForm = styled11("form")`
33027
+ var EditForm = styled9("form")`
33115
33028
  display: flex;
33116
33029
  flex-direction: column;
33117
33030
  gap: 0.75rem;
33118
33031
  `;
33119
- var StyledTextarea = styled11("textarea")`
33032
+ var StyledTextarea = styled9("textarea")`
33120
33033
  width: 100%;
33121
33034
  min-height: 120px;
33122
33035
  border-radius: var(--j-radius-md);
@@ -33133,15 +33046,15 @@ var StyledTextarea = styled11("textarea")`
33133
33046
  background-color: var(--j-foreground);
33134
33047
  }
33135
33048
  `;
33136
- var FormActions = styled11("div")`
33049
+ var FormActions = styled9("div")`
33137
33050
  display: flex;
33138
33051
  gap: 0.5rem;
33139
33052
  justify-content: flex-end;
33140
33053
  `;
33141
33054
 
33142
33055
  // src/inspector/ui/card.tsx
33143
- import { styled as styled12 } from "goober";
33144
- var Card = styled12("div")`
33056
+ import { styled as styled10 } from "goober";
33057
+ var Card = styled10("div")`
33145
33058
  background-color: var(--j-background);
33146
33059
  border-radius: var(--j-radius-lg);
33147
33060
  box-shadow: var(--j-shadow-sm);
@@ -33153,19 +33066,19 @@ var Card = styled12("div")`
33153
33066
  flex-direction: column;
33154
33067
  gap: 0.5rem;
33155
33068
  `;
33156
- var CardHeader = styled12("div")`
33069
+ var CardHeader = styled10("div")`
33157
33070
  display: flex;
33158
33071
  justify-content: space-between;
33159
33072
  align-items: center;
33160
33073
  `;
33161
- var CardBody = styled12("div")`
33074
+ var CardBody = styled10("div")`
33162
33075
  flex: 1;
33163
33076
  `;
33164
33077
 
33165
33078
  // src/inspector/ui/grid.tsx
33166
- var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
33167
- import { styled as styled13 } from "goober";
33168
- var GridThreeColumns = styled13("div")`
33079
+ var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
33080
+ import { styled as styled11 } from "goober";
33081
+ var GridThreeColumns = styled11("div")`
33169
33082
  display: grid;
33170
33083
  grid-template-columns: repeat(1, minmax(0, 1fr));
33171
33084
  gap: 1rem;
@@ -33178,7 +33091,7 @@ var GridThreeColumns = styled13("div")`
33178
33091
  grid-template-columns: repeat(3, minmax(0, 1fr));
33179
33092
  }
33180
33093
  `;
33181
- var GridTwoColumns = styled13("div")`
33094
+ var GridTwoColumns = styled11("div")`
33182
33095
  display: grid;
33183
33096
  grid-template-columns: repeat(1, minmax(0, 1fr));
33184
33097
  gap: 1rem;
@@ -33187,7 +33100,7 @@ var GridTwoColumns = styled13("div")`
33187
33100
  grid-template-columns: repeat(2, minmax(0, 1fr));
33188
33101
  }
33189
33102
  `;
33190
- var GridOneColumn = styled13("div")`
33103
+ var GridOneColumn = styled11("div")`
33191
33104
  display: grid;
33192
33105
  grid-template-columns: repeat(1, minmax(0, 1fr));
33193
33106
  gap: 1rem;
@@ -33196,11 +33109,11 @@ function Grid(props) {
33196
33109
  const { cols, children, ...rest } = props;
33197
33110
  switch (cols) {
33198
33111
  case 1:
33199
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(GridOneColumn, { ...rest, children });
33112
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GridOneColumn, { ...rest, children });
33200
33113
  case 2:
33201
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(GridTwoColumns, { ...rest, children });
33114
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GridTwoColumns, { ...rest, children });
33202
33115
  case 3:
33203
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(GridThreeColumns, { ...rest, children });
33116
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GridThreeColumns, { ...rest, children });
33204
33117
  default:
33205
33118
  throw new Error(`Invalid number of columns: ${cols}`);
33206
33119
  }
@@ -33212,7 +33125,7 @@ function isWriter(role) {
33212
33125
  }
33213
33126
 
33214
33127
  // src/inspector/viewer/grid-view.tsx
33215
- var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
33128
+ var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
33216
33129
  function GridItem({
33217
33130
  entry,
33218
33131
  onNavigate,
@@ -33221,7 +33134,7 @@ function GridItem({
33221
33134
  }) {
33222
33135
  const [key, value] = entry;
33223
33136
  const isCoValue = isCoId(value);
33224
- const [isEditing, setIsEditing] = (0, import_react11.useState)(false);
33137
+ const [isEditing, setIsEditing] = (0, import_react9.useState)(false);
33225
33138
  const handleEditClick = (e) => {
33226
33139
  e.stopPropagation();
33227
33140
  setIsEditing(true);
@@ -33244,7 +33157,7 @@ function GridItem({
33244
33157
  }
33245
33158
  };
33246
33159
  if (isEditing) {
33247
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
33160
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
33248
33161
  Card,
33249
33162
  {
33250
33163
  style: {
@@ -33252,11 +33165,11 @@ function GridItem({
33252
33165
  borderColor: "var(--j-foreground)"
33253
33166
  },
33254
33167
  children: [
33255
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: isCoValue ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
33256
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { strong: true, children: key }),
33257
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Badge, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ResolveIcon, { coId: value, node }) })
33258
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { strong: true, children: key }) }) }),
33259
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardBody, { style: { wordBreak: "break-word" }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
33168
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CardHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: isCoValue ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
33169
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { strong: true, children: key }),
33170
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Badge, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ResolveIcon, { coId: value, node }) })
33171
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { strong: true, children: key }) }) }),
33172
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CardBody, { style: { wordBreak: "break-word" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
33260
33173
  CoValueEditor,
33261
33174
  {
33262
33175
  node,
@@ -33279,34 +33192,34 @@ function GridItem({
33279
33192
  borderColor: "var(--j-foreground)"
33280
33193
  }
33281
33194
  };
33282
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Card, { ...cardProps, children: [
33283
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(CardHeader, { children: [
33284
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: isCoValue ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
33285
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { strong: true, children: key }),
33286
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Badge, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ResolveIcon, { coId: value, node }) })
33287
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { strong: true, children: key }) }),
33288
- coValue && isWriter(coValue.group.myRole()) && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(ActionButtons, { children: [
33289
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
33195
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Card, { ...cardProps, children: [
33196
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(CardHeader, { children: [
33197
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: isCoValue ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
33198
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { strong: true, children: key }),
33199
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Badge, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ResolveIcon, { coId: value, node }) })
33200
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { strong: true, children: key }) }),
33201
+ coValue && isWriter(coValue.group.myRole()) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(ActionButtons, { children: [
33202
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
33290
33203
  EditButton,
33291
33204
  {
33292
33205
  onClick: handleEditClick,
33293
33206
  type: "button",
33294
33207
  "aria-label": "Edit",
33295
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "edit", size: "sm" })
33208
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "edit", size: "sm" })
33296
33209
  }
33297
33210
  ),
33298
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
33211
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
33299
33212
  DeleteButton,
33300
33213
  {
33301
33214
  onClick: handleDelete,
33302
33215
  type: "button",
33303
33216
  "aria-label": "Delete",
33304
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "delete", size: "sm" })
33217
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "delete", size: "sm" })
33305
33218
  }
33306
33219
  )
33307
33220
  ] })
33308
33221
  ] }),
33309
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardBody, { style: { wordBreak: "break-word" }, children: isCoValue ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CoMapPreview, { coId: value, node }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
33222
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CardBody, { style: { wordBreak: "break-word" }, children: isCoValue ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CoMapPreview, { coId: value, node }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
33310
33223
  ValueRenderer,
33311
33224
  {
33312
33225
  json: value,
@@ -33324,7 +33237,7 @@ function GridView({
33324
33237
  coValue
33325
33238
  }) {
33326
33239
  const entries = Object.entries(data);
33327
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Grid, { cols: entries.length === 1 ? 1 : 3, children: entries.map((entry, childIndex) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
33240
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Grid, { cols: entries.length === 1 ? 1 : 3, children: entries.map((entry, childIndex) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
33328
33241
  GridItem,
33329
33242
  {
33330
33243
  entry,
@@ -33335,7 +33248,7 @@ function GridView({
33335
33248
  childIndex
33336
33249
  )) });
33337
33250
  }
33338
- var EditButton = styled14("button")`
33251
+ var EditButton = styled12("button")`
33339
33252
  display: inline-flex;
33340
33253
  align-items: center;
33341
33254
  justify-content: center;
@@ -33351,7 +33264,7 @@ var EditButton = styled14("button")`
33351
33264
  background-color: var(--j-foreground);
33352
33265
  }
33353
33266
  `;
33354
- var DeleteButton = styled14("button")`
33267
+ var DeleteButton = styled12("button")`
33355
33268
  display: inline-flex;
33356
33269
  align-items: center;
33357
33270
  justify-content: center;
@@ -33367,25 +33280,25 @@ var DeleteButton = styled14("button")`
33367
33280
  background-color: var(--j-foreground);
33368
33281
  }
33369
33282
  `;
33370
- var ActionButtons = styled14("div")`
33283
+ var ActionButtons = styled12("div")`
33371
33284
  display: flex;
33372
33285
  align-items: center;
33373
33286
  gap: 0.25rem;
33374
33287
  `;
33375
33288
 
33376
33289
  // src/inspector/viewer/raw-data-card.tsx
33377
- var import_react16 = __toESM(require_react(), 1);
33290
+ var import_react15 = __toESM(require_react(), 1);
33378
33291
 
33379
33292
  // src/inspector/ui/modal.tsx
33380
- var import_react12 = __toESM(require_react(), 1);
33381
- import { styled as styled15 } from "goober";
33382
- var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
33383
- var ModalContent = styled15("dialog")`
33293
+ var import_react10 = __toESM(require_react(), 1);
33294
+ import { styled as styled13 } from "goober";
33295
+ var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
33296
+ var ModalContent = styled13("dialog")`
33384
33297
  background-color: var(--j-background);
33385
33298
  border-radius: var(--j-radius-lg);
33386
33299
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
33387
33300
  border: 1px solid var(--j-border-color);
33388
- max-width: 32rem;
33301
+ ${(props) => props.wide ? "max-width: 60vw;" : "max-width: 32rem;"}
33389
33302
  margin-block: auto;
33390
33303
  margin-inline: auto;
33391
33304
  &::backdrop {
@@ -33393,24 +33306,24 @@ var ModalContent = styled15("dialog")`
33393
33306
  }
33394
33307
 
33395
33308
  `;
33396
- var ModalHeader = styled15("div")`
33309
+ var ModalHeader = styled13("div")`
33397
33310
  display: flex;
33398
33311
  justify-content: space-between;
33399
33312
  align-items: flex-start;
33400
33313
  padding: 1.5rem 1.5rem 0 1.5rem;
33401
33314
  gap: 1rem;
33402
33315
  `;
33403
- var ModalBody = styled15("div")`
33316
+ var ModalBody = styled13("div")`
33404
33317
  padding: 1rem 1.5rem;
33405
33318
  flex: 1;
33406
33319
  `;
33407
- var ModalFooter = styled15("div")`
33320
+ var ModalFooter = styled13("div")`
33408
33321
  display: flex;
33409
33322
  justify-content: flex-end;
33410
33323
  gap: 0.75rem;
33411
33324
  padding: 0 1.5rem 1.5rem 1.5rem;
33412
33325
  `;
33413
- var CloseButton = styled15("button")`
33326
+ var CloseButton = styled13("button")`
33414
33327
  background: none;
33415
33328
  border: none;
33416
33329
  cursor: pointer;
@@ -33434,7 +33347,7 @@ var CloseButton = styled15("button")`
33434
33347
  outline-offset: 2px;
33435
33348
  }
33436
33349
  `;
33437
- var Modal = (0, import_react12.forwardRef)(
33350
+ var Modal = (0, import_react10.forwardRef)(
33438
33351
  ({
33439
33352
  isOpen,
33440
33353
  onClose,
@@ -33446,10 +33359,11 @@ var Modal = (0, import_react12.forwardRef)(
33446
33359
  onConfirm,
33447
33360
  onCancel,
33448
33361
  showButtons = true,
33449
- className
33362
+ className,
33363
+ wide = false
33450
33364
  }, ref) => {
33451
- const modalRef = (0, import_react12.useRef)(null);
33452
- (0, import_react12.useEffect)(() => {
33365
+ const modalRef = (0, import_react10.useRef)(null);
33366
+ (0, import_react10.useEffect)(() => {
33453
33367
  if (isOpen) {
33454
33368
  modalRef.current?.showModal();
33455
33369
  } else {
@@ -33466,7 +33380,7 @@ var Modal = (0, import_react12.forwardRef)(
33466
33380
  onClose();
33467
33381
  };
33468
33382
  if (!isOpen) return null;
33469
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
33383
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
33470
33384
  ModalContent,
33471
33385
  {
33472
33386
  ref: ref || modalRef,
@@ -33474,18 +33388,19 @@ var Modal = (0, import_react12.forwardRef)(
33474
33388
  role: "dialog",
33475
33389
  "aria-labelledby": "modal-heading",
33476
33390
  onClose,
33391
+ wide,
33477
33392
  children: [
33478
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ModalHeader, { children: [
33479
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Heading, { id: "modal-heading", children: heading }),
33480
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CloseButton, { onClick: onClose, "aria-label": "Close modal", type: "button", children: "\xD7" })
33393
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ModalHeader, { children: [
33394
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Heading, { id: "modal-heading", children: heading }),
33395
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CloseButton, { onClick: onClose, "aria-label": "Close modal", type: "button", children: "\xD7" })
33481
33396
  ] }),
33482
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ModalBody, { children: [
33483
- text && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { style: { margin: "0 0 1rem 0", color: "var(--j-text-color)" }, children: text }),
33397
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ModalBody, { children: [
33398
+ text && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { style: { margin: "0 0 1rem 0", color: "var(--j-text-color)" }, children: text }),
33484
33399
  children
33485
33400
  ] }),
33486
- showButtons && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ModalFooter, { children: [
33487
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { variant: "secondary", onClick: handleCancel, children: cancelText }),
33488
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { variant: "primary", onClick: handleConfirm, children: confirmText })
33401
+ showButtons && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ModalFooter, { children: [
33402
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "secondary", onClick: handleCancel, children: cancelText }),
33403
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "primary", onClick: handleConfirm, children: confirmText })
33489
33404
  ] })
33490
33405
  ]
33491
33406
  }
@@ -33494,17 +33409,58 @@ var Modal = (0, import_react12.forwardRef)(
33494
33409
  );
33495
33410
  Modal.displayName = "Modal";
33496
33411
 
33412
+ // src/inspector/ui/input.tsx
33413
+ var import_react11 = __toESM(require_react(), 1);
33414
+ var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
33415
+ import { styled as styled14 } from "goober";
33416
+ var Container = styled14("div")`
33417
+ display: grid;
33418
+ gap: 0.25rem;
33419
+ `;
33420
+ var StyledInput = styled14("input")`
33421
+ width: 100%;
33422
+ border-radius: var(--j-radius-md);
33423
+ border: 1px solid var(--j-border-color);
33424
+ padding: 0.5rem 0.875rem;
33425
+ box-shadow: var(--j-shadow-sm);
33426
+ font-weight: 500;
33427
+ background-color: white;
33428
+ color: var(--j-text-color-strong);
33429
+
33430
+ @media (prefers-color-scheme: dark) {
33431
+ background-color: var(--j-foreground);
33432
+ }
33433
+ `;
33434
+ var Input = (0, import_react11.forwardRef)(
33435
+ ({ label, className, hideLabel, id: customId, ...inputProps }, ref) => {
33436
+ const generatedId = (0, import_react11.useId)();
33437
+ const id = customId || generatedId;
33438
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Container, { className, children: [
33439
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
33440
+ "label",
33441
+ {
33442
+ htmlFor: id,
33443
+ className: hideLabel ? "j-sr-only" : "",
33444
+ style: { color: "var(--j-text-color)" },
33445
+ children: label
33446
+ }
33447
+ ),
33448
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StyledInput, { ref, ...inputProps, id })
33449
+ ] });
33450
+ }
33451
+ );
33452
+
33497
33453
  // src/inspector/ui/data-table.tsx
33498
- var import_react14 = __toESM(require_react(), 1);
33454
+ var import_react13 = __toESM(require_react(), 1);
33499
33455
 
33500
33456
  // src/inspector/ui/table.tsx
33501
- var import_react13 = __toESM(require_react(), 1);
33502
- var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
33503
- import { styled as styled16 } from "goober";
33504
- var StyledTable = styled16("table")`
33457
+ var import_react12 = __toESM(require_react(), 1);
33458
+ var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
33459
+ import { styled as styled15 } from "goober";
33460
+ var StyledTable = styled15("table")`
33505
33461
  width: 100%;
33506
33462
  `;
33507
- var StyledThead = styled16("thead")`
33463
+ var StyledThead = styled15("thead")`
33508
33464
  text-align: left;
33509
33465
  border-bottom: 1px solid var(--j-border-color);
33510
33466
  background-color: var(--j-neutral-100);
@@ -33513,7 +33469,7 @@ var StyledThead = styled16("thead")`
33513
33469
  background-color: var(--j-neutral-925);
33514
33470
  }
33515
33471
  `;
33516
- var StyledTbody = styled16("tbody")`
33472
+ var StyledTbody = styled15("tbody")`
33517
33473
  tr {
33518
33474
  border-bottom: 1px solid var(--j-border-color);
33519
33475
 
@@ -33522,23 +33478,23 @@ var StyledTbody = styled16("tbody")`
33522
33478
  }
33523
33479
  }
33524
33480
  `;
33525
- var StyledTh = styled16("th")`
33481
+ var StyledTh = styled15("th")`
33526
33482
  font-weight: 500;
33527
33483
  padding: 0.5rem 0.75rem;
33528
33484
  color: var(--j-text-color-strong);
33529
33485
  `;
33530
- var StyledTd = styled16("td")`
33486
+ var StyledTd = styled15("td")`
33531
33487
  padding: 0.5rem 0.75rem;
33532
33488
  `;
33533
- var Table = import_react13.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledTable, { ref, ...props, children }));
33534
- var TableHead = import_react13.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledThead, { ref, ...props, children }));
33535
- var TableBody = import_react13.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledTbody, { ref, ...props, children }));
33536
- var TableRow = import_react13.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("tr", { ref, ...props, children }));
33537
- var TableHeader = import_react13.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledTh, { ref, ...props, children }));
33538
- var TableCell = import_react13.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledTd, { ref, ...props, children }));
33489
+ var Table = import_react12.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledTable, { ref, ...props, children }));
33490
+ var TableHead = import_react12.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledThead, { ref, ...props, children }));
33491
+ var TableBody = import_react12.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledTbody, { ref, ...props, children }));
33492
+ var TableRow = import_react12.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("tr", { ref, ...props, children }));
33493
+ var TableHeader = import_react12.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledTh, { ref, ...props, children }));
33494
+ var TableCell = import_react12.default.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledTd, { ref, ...props, children }));
33539
33495
 
33540
33496
  // src/inspector/ui/data-table.tsx
33541
- var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
33497
+ var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
33542
33498
  function DataTable({
33543
33499
  columns,
33544
33500
  data,
@@ -33547,10 +33503,10 @@ function DataTable({
33547
33503
  getRowKey,
33548
33504
  emptyMessage = "No data available"
33549
33505
  }) {
33550
- const [currentPage, setCurrentPage] = (0, import_react14.useState)(1);
33551
- const [sortConfig, setSortConfig] = (0, import_react14.useState)(initialSort);
33552
- const [filters, setFilters] = (0, import_react14.useState)({});
33553
- const filteredData = (0, import_react14.useMemo)(() => {
33506
+ const [currentPage, setCurrentPage] = (0, import_react13.useState)(1);
33507
+ const [sortConfig, setSortConfig] = (0, import_react13.useState)(initialSort);
33508
+ const [filters, setFilters] = (0, import_react13.useState)({});
33509
+ const filteredData = (0, import_react13.useMemo)(() => {
33554
33510
  return data.filter((row) => {
33555
33511
  return Object.entries(filters).every(([columnId, filterValue]) => {
33556
33512
  if (!filterValue) return true;
@@ -33564,7 +33520,7 @@ function DataTable({
33564
33520
  });
33565
33521
  });
33566
33522
  }, [data, filters, columns]);
33567
- const sortedData = (0, import_react14.useMemo)(() => {
33523
+ const sortedData = (0, import_react13.useMemo)(() => {
33568
33524
  if (!sortConfig) return filteredData;
33569
33525
  const column = columns.find((col) => col.id === sortConfig.columnId);
33570
33526
  if (!column?.sortable) return filteredData;
@@ -33583,7 +33539,7 @@ function DataTable({
33583
33539
  const startIndex = (currentPage - 1) * pageSize;
33584
33540
  const endIndex = startIndex + pageSize;
33585
33541
  const paginatedData = sortedData.slice(startIndex, endIndex);
33586
- (0, import_react14.useEffect)(() => {
33542
+ (0, import_react13.useEffect)(() => {
33587
33543
  setCurrentPage(1);
33588
33544
  }, [filters]);
33589
33545
  const handleSort = (columnId) => {
@@ -33608,9 +33564,9 @@ function DataTable({
33608
33564
  const handlePageChange = (page) => {
33609
33565
  setCurrentPage(Math.max(1, Math.min(page, totalPages)));
33610
33566
  };
33611
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
33612
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Table, { children: [
33613
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
33567
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
33568
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Table, { children: [
33569
+ /* @__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)(
33614
33570
  "div",
33615
33571
  {
33616
33572
  style: {
@@ -33621,8 +33577,8 @@ function DataTable({
33621
33577
  },
33622
33578
  onClick: () => handleSort(column.id),
33623
33579
  children: [
33624
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: column.header }),
33625
- column.sortable && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33580
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: column.header }),
33581
+ column.sortable && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33626
33582
  "span",
33627
33583
  {
33628
33584
  style: {
@@ -33635,8 +33591,8 @@ function DataTable({
33635
33591
  ]
33636
33592
  }
33637
33593
  ) }, column.id)) }) }),
33638
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(TableBody, { children: [
33639
- columns.some((column) => column.filterable) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: column.filterable && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33594
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(TableBody, { children: [
33595
+ 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)(
33640
33596
  Input,
33641
33597
  {
33642
33598
  label: "Filter",
@@ -33648,7 +33604,7 @@ function DataTable({
33648
33604
  onClick: (e) => e.stopPropagation()
33649
33605
  }
33650
33606
  ) }, column.id)) }),
33651
- paginatedData.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33607
+ 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)(
33652
33608
  "div",
33653
33609
  {
33654
33610
  style: {
@@ -33658,10 +33614,10 @@ function DataTable({
33658
33614
  },
33659
33615
  children: emptyMessage
33660
33616
  }
33661
- ) }) }) : paginatedData.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableCell, { children: column.accessor(row) }, column.id)) }, getRowKey(row, startIndex + index)))
33617
+ ) }) }) : 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)))
33662
33618
  ] })
33663
33619
  ] }),
33664
- showPagination && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
33620
+ showPagination && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
33665
33621
  "div",
33666
33622
  {
33667
33623
  style: {
@@ -33672,7 +33628,7 @@ function DataTable({
33672
33628
  padding: "8px 0"
33673
33629
  },
33674
33630
  children: [
33675
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: { fontSize: "14px", opacity: 0.7 }, children: [
33631
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { fontSize: "14px", opacity: 0.7 }, children: [
33676
33632
  "Showing ",
33677
33633
  startIndex + 1,
33678
33634
  " to ",
@@ -33683,8 +33639,8 @@ function DataTable({
33683
33639
  " entries",
33684
33640
  Object.keys(filters).some((key) => filters[key]) && ` (filtered from ${data.length})`
33685
33641
  ] }),
33686
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
33687
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33642
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
33643
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33688
33644
  Button,
33689
33645
  {
33690
33646
  variant: "secondary",
@@ -33693,7 +33649,7 @@ function DataTable({
33693
33649
  children: "\xAB\xAB"
33694
33650
  }
33695
33651
  ),
33696
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33652
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33697
33653
  Button,
33698
33654
  {
33699
33655
  variant: "secondary",
@@ -33702,13 +33658,13 @@ function DataTable({
33702
33658
  children: "\xAB"
33703
33659
  }
33704
33660
  ),
33705
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { style: { fontSize: "14px" }, children: [
33661
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { style: { fontSize: "14px" }, children: [
33706
33662
  "Page ",
33707
33663
  currentPage,
33708
33664
  " of ",
33709
33665
  totalPages
33710
33666
  ] }),
33711
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33667
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33712
33668
  Button,
33713
33669
  {
33714
33670
  variant: "secondary",
@@ -33717,7 +33673,7 @@ function DataTable({
33717
33673
  children: "\xBB"
33718
33674
  }
33719
33675
  ),
33720
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33676
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
33721
33677
  Button,
33722
33678
  {
33723
33679
  variant: "secondary",
@@ -33734,18 +33690,18 @@ function DataTable({
33734
33690
  }
33735
33691
 
33736
33692
  // src/inspector/ui/accordion.tsx
33737
- var import_react15 = __toESM(require_react(), 1);
33738
- var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
33739
- import { styled as styled17 } from "goober";
33693
+ var import_react14 = __toESM(require_react(), 1);
33694
+ var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
33695
+ import { styled as styled16 } from "goober";
33740
33696
  function Accordion({ title, children, storageKey }) {
33741
33697
  const [open, setOpen] = useStoragedState(storageKey, false);
33742
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
33698
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
33743
33699
  "details",
33744
33700
  {
33745
33701
  open,
33746
33702
  style: { display: "flex", flexDirection: "column", gap: "1rem" },
33747
33703
  children: [
33748
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33704
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
33749
33705
  StyledSummary,
33750
33706
  {
33751
33707
  onClick: (e) => {
@@ -33761,17 +33717,17 @@ function Accordion({ title, children, storageKey }) {
33761
33717
  );
33762
33718
  }
33763
33719
  function useStoragedState(key, defaultValue) {
33764
- const [state, setState] = (0, import_react15.useState)(() => {
33720
+ const [state, setState] = (0, import_react14.useState)(() => {
33765
33721
  if (typeof window === "undefined") return defaultValue;
33766
33722
  const stored = localStorage.getItem(key);
33767
33723
  return stored ? JSON.parse(stored) : defaultValue;
33768
33724
  });
33769
- (0, import_react15.useEffect)(() => {
33725
+ (0, import_react14.useEffect)(() => {
33770
33726
  localStorage.setItem(key, JSON.stringify(state));
33771
33727
  }, [state]);
33772
33728
  return [state, setState];
33773
33729
  }
33774
- var StyledSummary = styled17("summary")`
33730
+ var StyledSummary = styled16("summary")`
33775
33731
  font-size: 1.125rem;
33776
33732
  cursor: pointer;
33777
33733
  font-weight: 500;
@@ -33779,12 +33735,12 @@ var StyledSummary = styled17("summary")`
33779
33735
  `;
33780
33736
 
33781
33737
  // src/inspector/viewer/raw-data-card.tsx
33782
- var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
33738
+ var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
33783
33739
  function CopyButton({ data }) {
33784
- const [copyCount, setCopyCount] = (0, import_react16.useState)(0);
33740
+ const [copyCount, setCopyCount] = (0, import_react15.useState)(0);
33785
33741
  const copied = copyCount > 0;
33786
33742
  const stringifiedData = JSON.stringify(data);
33787
- (0, import_react16.useEffect)(() => {
33743
+ (0, import_react15.useEffect)(() => {
33788
33744
  if (copyCount > 0) {
33789
33745
  const timeout = setTimeout(() => setCopyCount(0), 1e3);
33790
33746
  return () => {
@@ -33792,7 +33748,7 @@ function CopyButton({ data }) {
33792
33748
  };
33793
33749
  }
33794
33750
  }, [copyCount]);
33795
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
33751
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
33796
33752
  Button,
33797
33753
  {
33798
33754
  style: {
@@ -33811,14 +33767,14 @@ function CopyButton({ data }) {
33811
33767
  );
33812
33768
  }
33813
33769
  function RawDataCard({ data }) {
33814
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Accordion, { title: "Raw data", storageKey: "jazz-inspector-show-raw-data", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Card, { style: { position: "relative" }, children: [
33815
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CardHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CopyButton, { data }) }),
33816
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CardBody, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ValueRenderer, { json: data }) })
33770
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Accordion, { title: "Raw data", storageKey: "jazz-inspector-show-raw-data", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Card, { style: { position: "relative" }, children: [
33771
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CardHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CopyButton, { data }) }),
33772
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CardBody, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ValueRenderer, { json: data }) })
33817
33773
  ] }) });
33818
33774
  }
33819
33775
 
33820
33776
  // src/inspector/viewer/account-view.tsx
33821
- var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
33777
+ var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
33822
33778
  function AccountView({
33823
33779
  data,
33824
33780
  onNavigate,
@@ -33830,24 +33786,24 @@ function AccountView({
33830
33786
  delete readableData[key];
33831
33787
  }
33832
33788
  }
33833
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
33834
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GridView, { data: readableData, onNavigate, node }),
33835
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RawDataCard, { data })
33789
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
33790
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(GridView, { data: readableData, onNavigate, node }),
33791
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RawDataCard, { data })
33836
33792
  ] });
33837
33793
  }
33838
33794
 
33839
33795
  // src/inspector/viewer/co-plain-text-view.tsx
33840
- var import_react17 = __toESM(require_react(), 1);
33841
- import { styled as styled18 } from "goober";
33796
+ var import_react16 = __toESM(require_react(), 1);
33797
+ import { styled as styled17 } from "goober";
33842
33798
  import { CoPlainText } from "jazz-tools";
33843
- var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
33799
+ var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
33844
33800
  function CoPlainTextView({
33845
33801
  data,
33846
33802
  coValue
33847
33803
  }) {
33848
33804
  const currentText = Object.values(data).join("");
33849
- const [isEditing, setIsEditing] = (0, import_react17.useState)(false);
33850
- const [editValue, setEditValue] = (0, import_react17.useState)("");
33805
+ const [isEditing, setIsEditing] = (0, import_react16.useState)(false);
33806
+ const [editValue, setEditValue] = (0, import_react16.useState)("");
33851
33807
  const canEdit2 = isWriter(coValue.group.myRole());
33852
33808
  const handleEditClick = () => {
33853
33809
  setIsEditing(true);
@@ -33866,9 +33822,9 @@ function CoPlainTextView({
33866
33822
  };
33867
33823
  if (!data) return;
33868
33824
  if (isEditing) {
33869
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
33870
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(EditForm2, { onSubmit: handleSave, children: [
33871
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
33825
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
33826
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(EditForm2, { onSubmit: handleSave, children: [
33827
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
33872
33828
  StyledTextarea2,
33873
33829
  {
33874
33830
  value: editValue,
@@ -33876,27 +33832,27 @@ function CoPlainTextView({
33876
33832
  onClick: (e) => e.stopPropagation()
33877
33833
  }
33878
33834
  ),
33879
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(FormActions2, { children: [
33880
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { type: "button", variant: "secondary", onClick: handleCancel, children: "Cancel" }),
33881
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { type: "submit", variant: "primary", children: "Save" })
33835
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(FormActions2, { children: [
33836
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { type: "button", variant: "secondary", onClick: handleCancel, children: "Cancel" }),
33837
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { type: "submit", variant: "primary", children: "Save" })
33882
33838
  ] })
33883
33839
  ] }),
33884
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RawDataCard, { data })
33840
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RawDataCard, { data })
33885
33841
  ] });
33886
33842
  }
33887
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
33888
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: currentText }),
33889
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children: canEdit2 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { variant: "secondary", onClick: handleEditClick, title: "Edit", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "edit" }) }) }),
33890
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RawDataCard, { data })
33843
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
33844
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: currentText }),
33845
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { children: canEdit2 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { variant: "secondary", onClick: handleEditClick, title: "Edit", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "edit" }) }) }),
33846
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RawDataCard, { data })
33891
33847
  ] });
33892
33848
  }
33893
- var EditForm2 = styled18("form")`
33849
+ var EditForm2 = styled17("form")`
33894
33850
  display: flex;
33895
33851
  flex-direction: column;
33896
33852
  gap: 0.75rem;
33897
33853
  margin-bottom: 1rem;
33898
33854
  `;
33899
- var StyledTextarea2 = styled18("textarea")`
33855
+ var StyledTextarea2 = styled17("textarea")`
33900
33856
  width: 100%;
33901
33857
  min-height: 120px;
33902
33858
  border-radius: var(--j-radius-md);
@@ -33913,15 +33869,15 @@ var StyledTextarea2 = styled18("textarea")`
33913
33869
  background-color: var(--j-foreground);
33914
33870
  }
33915
33871
  `;
33916
- var FormActions2 = styled18("div")`
33872
+ var FormActions2 = styled17("div")`
33917
33873
  display: flex;
33918
33874
  gap: 0.5rem;
33919
33875
  justify-content: flex-end;
33920
33876
  `;
33921
33877
 
33922
33878
  // src/inspector/viewer/group-view.tsx
33923
- var import_react18 = __toESM(require_react(), 1);
33924
- var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
33879
+ var import_react17 = __toESM(require_react(), 1);
33880
+ var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
33925
33881
  function partitionMembers(data) {
33926
33882
  const everyone = Object.entries(data).filter(([key]) => key === "everyone").map(([key, value]) => ({
33927
33883
  id: key,
@@ -33949,7 +33905,7 @@ function GroupView({
33949
33905
  onNavigate,
33950
33906
  node
33951
33907
  }) {
33952
- const [addMemberType, setAddMemberType] = (0, import_react18.useState)(null);
33908
+ const [addMemberType, setAddMemberType] = (0, import_react17.useState)(null);
33953
33909
  const { everyone, members, parentGroups, childGroups } = partitionMembers(
33954
33910
  data
33955
33911
  );
@@ -34028,28 +33984,28 @@ function GroupView({
34028
33984
  alert(`Failed to add ${addMemberType}: ${error.message}`);
34029
33985
  }
34030
33986
  };
34031
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
34032
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Table, { children: [
34033
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(TableRow, { children: [
34034
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableHeader, { children: "Member" }),
34035
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableHeader, { children: "Permission" }),
34036
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableHeader, {})
33987
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
33988
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Table, { children: [
33989
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TableRow, { children: [
33990
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableHeader, { children: "Member" }),
33991
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableHeader, { children: "Permission" }),
33992
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableHeader, {})
34037
33993
  ] }) }),
34038
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(TableBody, { children: [
34039
- everyone.map((member) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(TableRow, { children: [
34040
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableCell, { children: member.id }),
34041
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableCell, { children: member.role }),
34042
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableCell, { children: member.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
33994
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TableBody, { children: [
33995
+ everyone.map((member) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TableRow, { children: [
33996
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: member.id }),
33997
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: member.role }),
33998
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: member.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34043
33999
  Button,
34044
34000
  {
34045
34001
  variant: "secondary",
34046
34002
  onClick: () => onRemoveMember(member.id),
34047
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "delete" })
34003
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "delete" })
34048
34004
  }
34049
34005
  ) })
34050
34006
  ] }, member.id)),
34051
- members.map((member) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(TableRow, { children: [
34052
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34007
+ members.map((member) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TableRow, { children: [
34008
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34053
34009
  AccountOrGroupText,
34054
34010
  {
34055
34011
  coId: member.id,
@@ -34060,18 +34016,18 @@ function GroupView({
34060
34016
  }
34061
34017
  }
34062
34018
  ) }),
34063
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableCell, { children: member.role }),
34064
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableCell, { children: member.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34019
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: member.role }),
34020
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: member.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34065
34021
  Button,
34066
34022
  {
34067
34023
  variant: "secondary",
34068
34024
  onClick: () => onRemoveMember(member.id),
34069
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "delete" })
34025
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "delete" })
34070
34026
  }
34071
34027
  ) })
34072
34028
  ] }, member.id)),
34073
- parentGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(TableRow, { children: [
34074
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34029
+ parentGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TableRow, { children: [
34030
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34075
34031
  AccountOrGroupText,
34076
34032
  {
34077
34033
  coId: group.id,
@@ -34082,19 +34038,19 @@ function GroupView({
34082
34038
  }
34083
34039
  }
34084
34040
  ) }),
34085
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableCell, { children: group.role }),
34086
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableCell, { children: group.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34041
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: group.role }),
34042
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: group.role !== "revoked" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34087
34043
  Button,
34088
34044
  {
34089
34045
  variant: "secondary",
34090
34046
  onClick: () => onRemoveGroup(group.id),
34091
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "delete" })
34047
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "delete" })
34092
34048
  }
34093
34049
  ) })
34094
34050
  ] }, group.id))
34095
34051
  ] })
34096
34052
  ] }),
34097
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
34053
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
34098
34054
  "div",
34099
34055
  {
34100
34056
  style: {
@@ -34104,14 +34060,14 @@ function GroupView({
34104
34060
  marginTop: "1rem"
34105
34061
  },
34106
34062
  children: [
34107
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { variant: "primary", onClick: () => setAddMemberType("account"), children: "Add Account" }),
34108
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { variant: "primary", onClick: () => setAddMemberType("group"), children: "Add Group" })
34063
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { variant: "primary", onClick: () => setAddMemberType("account"), children: "Add Account" }),
34064
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { variant: "primary", onClick: () => setAddMemberType("group"), children: "Add Group" })
34109
34065
  ]
34110
34066
  }
34111
34067
  ),
34112
- childGroups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Table, { children: [
34113
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableHeader, { children: "Member of" }) }) }),
34114
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableBody, { children: childGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34068
+ childGroups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Table, { children: [
34069
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableHeader, { children: "Member of" }) }) }),
34070
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableBody, { children: childGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34115
34071
  AccountOrGroupText,
34116
34072
  {
34117
34073
  coId: group.id,
@@ -34123,20 +34079,20 @@ function GroupView({
34123
34079
  }
34124
34080
  ) }) }, group.id)) })
34125
34081
  ] }),
34126
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RawDataCard, { data }),
34127
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34082
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RawDataCard, { data }),
34083
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34128
34084
  Modal,
34129
34085
  {
34130
34086
  isOpen: addMemberType !== null,
34131
34087
  onClose: () => setAddMemberType(null),
34132
34088
  heading: addMemberType === "account" ? "Add Account" : "Add Group",
34133
34089
  showButtons: false,
34134
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("form", { onSubmit: handleAddMemberSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
34090
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("form", { onSubmit: handleAddMemberSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
34135
34091
  "div",
34136
34092
  {
34137
34093
  style: { display: "flex", flexDirection: "column", gap: "1rem" },
34138
34094
  children: [
34139
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34095
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34140
34096
  Input,
34141
34097
  {
34142
34098
  name: "memberId",
@@ -34145,13 +34101,13 @@ function GroupView({
34145
34101
  required: true
34146
34102
  }
34147
34103
  ),
34148
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Select, { name: "role", label: "Role", children: [
34149
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: "reader", children: "Reader" }),
34150
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: "writer", children: "Writer" }),
34151
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: "admin", children: "Admin" }),
34152
- addMemberType === "account" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: "writeOnly", children: "Write Only" }) }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("option", { value: "inherit", children: "Inherit" }) })
34104
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Select, { name: "role", label: "Role", children: [
34105
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("option", { value: "reader", children: "Reader" }),
34106
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("option", { value: "writer", children: "Writer" }),
34107
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("option", { value: "admin", children: "Admin" }),
34108
+ addMemberType === "account" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("option", { value: "writeOnly", children: "Write Only" }) }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("option", { value: "inherit", children: "Inherit" }) })
34153
34109
  ] }),
34154
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
34110
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
34155
34111
  "div",
34156
34112
  {
34157
34113
  style: {
@@ -34161,7 +34117,7 @@ function GroupView({
34161
34117
  marginTop: "0.5rem"
34162
34118
  },
34163
34119
  children: [
34164
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
34120
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
34165
34121
  Button,
34166
34122
  {
34167
34123
  type: "button",
@@ -34170,7 +34126,7 @@ function GroupView({
34170
34126
  children: "Cancel"
34171
34127
  }
34172
34128
  ),
34173
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { type: "submit", variant: "primary", children: "Add" })
34129
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { type: "submit", variant: "primary", children: "Add" })
34174
34130
  ]
34175
34131
  }
34176
34132
  )
@@ -34183,7 +34139,7 @@ function GroupView({
34183
34139
  }
34184
34140
 
34185
34141
  // src/inspector/viewer/role-display.tsx
34186
- var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
34142
+ var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
34187
34143
  function RoleDisplay({
34188
34144
  node,
34189
34145
  value
@@ -34202,24 +34158,24 @@ function RoleDisplay({
34202
34158
  } else {
34203
34159
  role = "unauthorized";
34204
34160
  }
34205
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Text, { children: [
34161
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Text, { children: [
34206
34162
  "Role: ",
34207
34163
  role
34208
34164
  ] });
34209
34165
  }
34210
34166
 
34211
34167
  // src/inspector/viewer/table-viewer.tsx
34212
- var import_react19 = __toESM(require_react(), 1);
34213
- import { styled as styled19 } from "goober";
34214
- var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
34215
- var PaginationContainer = styled19("div")`
34168
+ var import_react18 = __toESM(require_react(), 1);
34169
+ import { styled as styled18 } from "goober";
34170
+ var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
34171
+ var PaginationContainer = styled18("div")`
34216
34172
  padding: 1rem 0;
34217
34173
  display: flex;
34218
34174
  align-items: center;
34219
34175
  justify-content: space-between;
34220
34176
  gap: 0.5rem;
34221
34177
  `;
34222
- var RedTooltip = styled19("span")`
34178
+ var RedTooltip = styled18("span")`
34223
34179
  position:relative; /* making the .tooltip span a container for the tooltip text */
34224
34180
  border-bottom:1px dashed #000; /* little indicater to indicate it's hoverable */
34225
34181
 
@@ -34256,8 +34212,8 @@ function CoValuesTableView({
34256
34212
  onNavigate,
34257
34213
  onRemove
34258
34214
  }) {
34259
- const [visibleRowsCount, setVisibleRowsCount] = (0, import_react19.useState)(10);
34260
- const [coIdArray, visibleRows] = (0, import_react19.useMemo)(() => {
34215
+ const [visibleRowsCount, setVisibleRowsCount] = (0, import_react18.useState)(10);
34216
+ const [coIdArray, visibleRows] = (0, import_react18.useMemo)(() => {
34261
34217
  const coIdArray2 = Array.isArray(data) ? data : Object.values(data).every((k) => typeof k === "string" && isCoId(k)) ? Object.values(data).map((k) => k) : [];
34262
34218
  const visibleRows2 = coIdArray2.slice(0, visibleRowsCount);
34263
34219
  return [coIdArray2, visibleRows2];
@@ -34265,10 +34221,10 @@ function CoValuesTableView({
34265
34221
  const resolvedRows = useResolvedCoValues(visibleRows, node);
34266
34222
  const hasMore = visibleRowsCount < coIdArray.length;
34267
34223
  if (!coIdArray.length) {
34268
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: "No data to display" });
34224
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: "No data to display" });
34269
34225
  }
34270
34226
  if (resolvedRows.length === 0) {
34271
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: "Loading..." });
34227
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: "Loading..." });
34272
34228
  }
34273
34229
  const keys = Array.from(
34274
34230
  new Set(
@@ -34278,15 +34234,15 @@ function CoValuesTableView({
34278
34234
  const loadMore = () => {
34279
34235
  setVisibleRowsCount((prevVisibleRows) => prevVisibleRows + 10);
34280
34236
  };
34281
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
34282
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Table, { children: [
34283
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(TableRow, { children: [
34284
- ["ID", ...keys, "Action"].map((key) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableHeader, { children: key }, key)),
34285
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableHeader, {})
34237
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
34238
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Table, { children: [
34239
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TableRow, { children: [
34240
+ ["ID", ...keys, "Action"].map((key) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableHeader, { children: key }, key)),
34241
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableHeader, {})
34286
34242
  ] }) }),
34287
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableBody, { children: resolvedRows.slice(0, visibleRowsCount).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(TableRow, { children: [
34288
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { mono: true, children: item.snapshot === "unavailable" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(RedTooltip, { "data-text": "Unavailable", children: [
34289
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34243
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableBody, { children: resolvedRows.slice(0, visibleRowsCount).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TableRow, { children: [
34244
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { mono: true, children: item.snapshot === "unavailable" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(RedTooltip, { "data-text": "Unavailable", children: [
34245
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
34290
34246
  Icon,
34291
34247
  {
34292
34248
  name: "caution",
@@ -34299,7 +34255,7 @@ function CoValuesTableView({
34299
34255
  ),
34300
34256
  visibleRows[index]
34301
34257
  ] }) : visibleRows[index] }) }),
34302
- keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableCell, { children: item.snapshot !== "unavailable" && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34258
+ keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableCell, { children: item.snapshot !== "unavailable" && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
34303
34259
  ValueRenderer,
34304
34260
  {
34305
34261
  json: item.snapshot[key],
@@ -34320,7 +34276,7 @@ function CoValuesTableView({
34320
34276
  }
34321
34277
  }
34322
34278
  ) }, key)),
34323
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34279
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
34324
34280
  Button,
34325
34281
  {
34326
34282
  variant: "secondary",
@@ -34333,18 +34289,18 @@ function CoValuesTableView({
34333
34289
  children: "View"
34334
34290
  }
34335
34291
  ) }),
34336
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
34292
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
34337
34293
  ] }, index)) })
34338
34294
  ] }),
34339
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(PaginationContainer, { children: [
34340
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Text, { muted: true, small: true, children: [
34295
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(PaginationContainer, { children: [
34296
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Text, { muted: true, small: true, children: [
34341
34297
  "Showing ",
34342
34298
  Math.min(visibleRowsCount, coIdArray.length),
34343
34299
  " of",
34344
34300
  " ",
34345
34301
  coIdArray.length
34346
34302
  ] }),
34347
- hasMore && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Button, { variant: "secondary", onClick: loadMore, children: "Load more" })
34303
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { variant: "secondary", onClick: loadMore, children: "Load more" })
34348
34304
  ] })
34349
34305
  ] });
34350
34306
  }
@@ -34354,11 +34310,11 @@ function TableView({
34354
34310
  onNavigate,
34355
34311
  onRemove
34356
34312
  }) {
34357
- const isListOfCoValues = (0, import_react19.useMemo)(() => {
34313
+ const isListOfCoValues = (0, import_react18.useMemo)(() => {
34358
34314
  return Array.isArray(data) && data.every((k) => isCoId(k));
34359
34315
  }, [data]);
34360
34316
  if (isListOfCoValues) {
34361
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34317
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
34362
34318
  CoValuesTableView,
34363
34319
  {
34364
34320
  data,
@@ -34368,23 +34324,23 @@ function TableView({
34368
34324
  }
34369
34325
  );
34370
34326
  }
34371
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Table, { children: [
34372
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(TableRow, { children: [
34373
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableHeader, { style: { width: "5rem" }, children: "Index" }),
34374
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableHeader, { children: "Value" }),
34375
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableHeader, { children: "Action" })
34327
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Table, { children: [
34328
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TableRow, { children: [
34329
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableHeader, { style: { width: "5rem" }, children: "Index" }),
34330
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableHeader, { children: "Value" }),
34331
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableHeader, { children: "Action" })
34376
34332
  ] }) }),
34377
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableBody, { children: Array.isArray(data) && data?.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(TableRow, { children: [
34378
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { mono: true, children: index }) }),
34379
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ValueRenderer, { json: value }) }),
34380
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
34333
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableBody, { children: Array.isArray(data) && data?.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TableRow, { children: [
34334
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { mono: true, children: index }) }),
34335
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ValueRenderer, { json: value }) }),
34336
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { variant: "secondary", onClick: () => onRemove(index), children: "Remove" }) })
34381
34337
  ] }, index)) })
34382
34338
  ] });
34383
34339
  }
34384
34340
 
34385
34341
  // src/inspector/viewer/history-view.tsx
34386
- var import_react20 = __toESM(require_react(), 1);
34387
- import { styled as styled20 } from "goober";
34342
+ var import_react19 = __toESM(require_react(), 1);
34343
+ import { styled as styled19 } from "goober";
34388
34344
 
34389
34345
  // src/inspector/utils/transactions-changes.ts
34390
34346
  var isGroupExtension = (change) => {
@@ -34562,12 +34518,12 @@ function restoreCoMapToTimestamp(coValue, timestamp, removeUnknownProperties) {
34562
34518
  }
34563
34519
 
34564
34520
  // src/inspector/viewer/history-view.tsx
34565
- var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
34521
+ var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
34566
34522
  function HistoryView({
34567
34523
  coValue,
34568
34524
  node
34569
34525
  }) {
34570
- const transactions = (0, import_react20.useMemo)(
34526
+ const transactions = (0, import_react19.useMemo)(
34571
34527
  () => getHistory(coValue),
34572
34528
  [coValue.core.verifiedTransactions.length]
34573
34529
  );
@@ -34575,8 +34531,8 @@ function HistoryView({
34575
34531
  {
34576
34532
  id: "author",
34577
34533
  header: "Author",
34578
- accessor: (row) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
34579
- row.isValid || /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RedTooltip2, { "data-text": "This transaction is invalid and is not used", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34534
+ accessor: (row) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
34535
+ row.isValid || /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RedTooltip2, { "data-text": "This transaction is invalid and is not used", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34580
34536
  Icon,
34581
34537
  {
34582
34538
  name: "caution",
@@ -34589,7 +34545,7 @@ function HistoryView({
34589
34545
  }
34590
34546
  }
34591
34547
  ) }),
34592
- row.author.startsWith("co_") ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34548
+ row.author.startsWith("co_") ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34593
34549
  AccountOrGroupText,
34594
34550
  {
34595
34551
  coId: row.author,
@@ -34608,9 +34564,9 @@ function HistoryView({
34608
34564
  header: "Action",
34609
34565
  accessor: (row) => {
34610
34566
  if (row.isValid) return row.action;
34611
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
34567
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
34612
34568
  row.action,
34613
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { style: { color: "red", display: "block" }, children: [
34569
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { style: { color: "red", display: "block" }, children: [
34614
34570
  "Invalid transaction: ",
34615
34571
  row.validationErrorMessage
34616
34572
  ] })
@@ -34629,7 +34585,7 @@ function HistoryView({
34629
34585
  sortFn: (a, b) => a.timestamp.getTime() - b.timestamp.getTime()
34630
34586
  }
34631
34587
  ];
34632
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Accordion, { title: "CoValue history", storageKey: "jazz-inspector-show-history", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34588
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Accordion, { title: "CoValue history", storageKey: "jazz-inspector-show-history", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
34633
34589
  DataTable,
34634
34590
  {
34635
34591
  columns,
@@ -34729,7 +34685,7 @@ var findListChange = (opId, coValue) => {
34729
34685
  (tx) => tx.txID.sessionID === opId.sessionID && tx.txID.txIndex === opId.txIndex
34730
34686
  )?.changes?.[opId.changeIdx];
34731
34687
  };
34732
- var RedTooltip2 = styled20("span")`
34688
+ var RedTooltip2 = styled19("span")`
34733
34689
  position:relative; /* making the .tooltip span a container for the tooltip text */
34734
34690
  border-bottom:1px dashed #000; /* little indicater to indicate it's hoverable */
34735
34691
 
@@ -34762,17 +34718,17 @@ var RedTooltip2 = styled20("span")`
34762
34718
  `;
34763
34719
 
34764
34720
  // src/inspector/viewer/co-map-view.tsx
34765
- var import_react21 = __toESM(require_react(), 1);
34766
- import { styled as styled21 } from "goober";
34767
- var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
34721
+ var import_react20 = __toESM(require_react(), 1);
34722
+ import { styled as styled20 } from "goober";
34723
+ var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
34768
34724
  function CoMapView({
34769
34725
  coValue,
34770
34726
  data,
34771
34727
  node,
34772
34728
  onNavigate
34773
34729
  }) {
34774
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
34775
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34730
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
34731
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34776
34732
  GridView,
34777
34733
  {
34778
34734
  data,
@@ -34781,8 +34737,8 @@ function CoMapView({
34781
34737
  coValue
34782
34738
  }
34783
34739
  ),
34784
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
34785
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34740
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
34741
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34786
34742
  AddPropertyModal,
34787
34743
  {
34788
34744
  disabled: !isWriter(coValue.group.myRole()),
@@ -34791,7 +34747,7 @@ function CoMapView({
34791
34747
  }
34792
34748
  ),
34793
34749
  " ",
34794
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RestoreSnapshotModal, { coValue })
34750
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RestoreSnapshotModal, { coValue })
34795
34751
  ] })
34796
34752
  ] });
34797
34753
  }
@@ -34800,8 +34756,8 @@ function AddPropertyModal({
34800
34756
  node,
34801
34757
  disabled
34802
34758
  }) {
34803
- const [isAddPropertyModalOpen, setIsAddPropertyModalOpen] = (0, import_react21.useState)(false);
34804
- const [propertyName, setPropertyName] = (0, import_react21.useState)("");
34759
+ const [isAddPropertyModalOpen, setIsAddPropertyModalOpen] = (0, import_react20.useState)(false);
34760
+ const [propertyName, setPropertyName] = (0, import_react20.useState)("");
34805
34761
  const openAddPropertyModal = () => {
34806
34762
  setIsAddPropertyModalOpen(true);
34807
34763
  setPropertyName("");
@@ -34810,18 +34766,18 @@ function AddPropertyModal({
34810
34766
  setIsAddPropertyModalOpen(false);
34811
34767
  setPropertyName("");
34812
34768
  };
34813
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
34814
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34769
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
34770
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34815
34771
  Button,
34816
34772
  {
34817
34773
  title: "Add Property",
34818
34774
  variant: "secondary",
34819
34775
  disabled,
34820
34776
  onClick: openAddPropertyModal,
34821
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: "add" })
34777
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: "add" })
34822
34778
  }
34823
34779
  ),
34824
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
34780
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
34825
34781
  Modal,
34826
34782
  {
34827
34783
  isOpen: isAddPropertyModalOpen,
@@ -34829,7 +34785,7 @@ function AddPropertyModal({
34829
34785
  heading: "Add Property",
34830
34786
  showButtons: false,
34831
34787
  children: [
34832
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34788
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34833
34789
  Input,
34834
34790
  {
34835
34791
  label: "Property Name",
@@ -34838,7 +34794,7 @@ function AddPropertyModal({
34838
34794
  placeholder: "Enter property name"
34839
34795
  }
34840
34796
  ),
34841
- propertyName && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(EditorContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34797
+ propertyName && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(EditorContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34842
34798
  CoValueEditor,
34843
34799
  {
34844
34800
  node,
@@ -34854,14 +34810,14 @@ function AddPropertyModal({
34854
34810
  ] });
34855
34811
  }
34856
34812
  function RestoreSnapshotModal({ coValue }) {
34857
- const [isRestoreModalOpen, setIsRestoreModalOpen] = (0, import_react21.useState)(false);
34858
- const [selectedIndex, setSelectedIndex] = (0, import_react21.useState)(-1);
34859
- const [removeUnknownProperties, setRemoveUnknownProperties] = (0, import_react21.useState)(false);
34860
- const timestamps = (0, import_react21.useMemo)(
34813
+ const [isRestoreModalOpen, setIsRestoreModalOpen] = (0, import_react20.useState)(false);
34814
+ const [selectedIndex, setSelectedIndex] = (0, import_react20.useState)(-1);
34815
+ const [removeUnknownProperties, setRemoveUnknownProperties] = (0, import_react20.useState)(false);
34816
+ const timestamps = (0, import_react20.useMemo)(
34861
34817
  () => coValue.core.verifiedTransactions.map((tx) => tx.madeAt),
34862
34818
  [coValue.core.verifiedTransactions.length]
34863
34819
  );
34864
- const coMapAtSelectedIndex = (0, import_react21.useMemo)(() => {
34820
+ const coMapAtSelectedIndex = (0, import_react20.useMemo)(() => {
34865
34821
  if (selectedIndex === -1) return null;
34866
34822
  return coValue.atTime(timestamps[selectedIndex]).toJSON();
34867
34823
  }, [coValue, timestamps, selectedIndex]);
@@ -34885,9 +34841,9 @@ function RestoreSnapshotModal({ coValue }) {
34885
34841
  setIsRestoreModalOpen(false);
34886
34842
  };
34887
34843
  const canRestore = isWriter(coValue.group.myRole());
34888
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
34889
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { title: "Timeline", variant: "secondary", onClick: openRestoreModal, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: "history" }) }),
34890
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
34844
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
34845
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { title: "Timeline", variant: "secondary", onClick: openRestoreModal, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: "history" }) }),
34846
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
34891
34847
  Modal,
34892
34848
  {
34893
34849
  isOpen: isRestoreModalOpen,
@@ -34899,10 +34855,10 @@ function RestoreSnapshotModal({ coValue }) {
34899
34855
  onCancel: handleClose,
34900
34856
  showButtons: timestamps.length > 1 && canRestore,
34901
34857
  children: [
34902
- timestamps.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
34903
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(RangeContainer, { children: [
34904
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RangeLabel, { children: "Select Timestamp" }),
34905
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34858
+ timestamps.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
34859
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(RangeContainer, { children: [
34860
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RangeLabel, { children: "Select Timestamp" }),
34861
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34906
34862
  RangeInput,
34907
34863
  {
34908
34864
  type: "range",
@@ -34913,10 +34869,10 @@ function RestoreSnapshotModal({ coValue }) {
34913
34869
  disabled: timestamps.length === 0
34914
34870
  }
34915
34871
  ),
34916
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TimestampDisplay, { children: timestamps[selectedIndex] !== void 0 ? new Date(timestamps[selectedIndex]).toISOString() : "No timestamps available" })
34872
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TimestampDisplay, { children: timestamps[selectedIndex] !== void 0 ? new Date(timestamps[selectedIndex]).toISOString() : "No timestamps available" })
34917
34873
  ] }),
34918
- canRestore && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(CheckboxContainer, { children: [
34919
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
34874
+ canRestore && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(CheckboxContainer, { children: [
34875
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
34920
34876
  CheckboxInput,
34921
34877
  {
34922
34878
  type: "checkbox",
@@ -34925,28 +34881,28 @@ function RestoreSnapshotModal({ coValue }) {
34925
34881
  onChange: (e) => setRemoveUnknownProperties(e.target.checked)
34926
34882
  }
34927
34883
  ),
34928
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CheckboxLabel, { htmlFor: "remove-unknown-properties", children: "Remove unknown properties (properties that don't exist in the selected snapshot)" })
34884
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CheckboxLabel, { htmlFor: "remove-unknown-properties", children: "Remove unknown properties (properties that don't exist in the selected snapshot)" })
34929
34885
  ] })
34930
34886
  ] }),
34931
- timestamps.length > 0 && timestamps[selectedIndex] !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(PreviewSection, { children: [
34932
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PreviewLabel, { children: "State at that time:" }),
34933
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PreviewPre, { children: JSON.stringify(coMapAtSelectedIndex, null, 2) })
34887
+ timestamps.length > 0 && timestamps[selectedIndex] !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(PreviewSection, { children: [
34888
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PreviewLabel, { children: "State at that time:" }),
34889
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PreviewPre, { children: JSON.stringify(coMapAtSelectedIndex, null, 2) })
34934
34890
  ] }),
34935
- timestamps.length < 2 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { color: "var(--j-text-color)" }, children: "At least 2 timestamps are required to restore a snapshot." })
34891
+ timestamps.length < 2 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { color: "var(--j-text-color)" }, children: "At least 2 timestamps are required to restore a snapshot." })
34936
34892
  ]
34937
34893
  }
34938
34894
  )
34939
34895
  ] });
34940
34896
  }
34941
- var PreviewSection = styled21("div")`
34897
+ var PreviewSection = styled20("div")`
34942
34898
  margin-top: 1.5rem;
34943
34899
  `;
34944
- var PreviewLabel = styled21("div")`
34900
+ var PreviewLabel = styled20("div")`
34945
34901
  font-weight: 500;
34946
34902
  margin-bottom: 0.5rem;
34947
34903
  color: var(--j-text-color-strong);
34948
34904
  `;
34949
- var PreviewPre = styled21("pre")`
34905
+ var PreviewPre = styled20("pre")`
34950
34906
  background-color: var(--j-foreground);
34951
34907
  border: 1px solid var(--j-border-color);
34952
34908
  border-radius: var(--j-radius-md);
@@ -34958,17 +34914,17 @@ var PreviewPre = styled21("pre")`
34958
34914
  color: var(--j-text-color);
34959
34915
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
34960
34916
  `;
34961
- var RangeContainer = styled21("div")`
34917
+ var RangeContainer = styled20("div")`
34962
34918
  display: flex;
34963
34919
  flex-direction: column;
34964
34920
  gap: 0.75rem;
34965
34921
  `;
34966
- var RangeLabel = styled21("label")`
34922
+ var RangeLabel = styled20("label")`
34967
34923
  font-weight: 500;
34968
34924
  color: var(--j-text-color-strong);
34969
34925
  font-size: 0.875rem;
34970
34926
  `;
34971
- var RangeInput = styled21("input")`
34927
+ var RangeInput = styled20("input")`
34972
34928
  width: 100%;
34973
34929
  height: 0.5rem;
34974
34930
  border-radius: var(--j-radius-sm);
@@ -35005,7 +34961,7 @@ var RangeInput = styled21("input")`
35005
34961
  cursor: not-allowed;
35006
34962
  }
35007
34963
  `;
35008
- var TimestampDisplay = styled21("div")`
34964
+ var TimestampDisplay = styled20("div")`
35009
34965
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
35010
34966
  font-size: 0.875rem;
35011
34967
  color: var(--j-text-color);
@@ -35015,35 +34971,35 @@ var TimestampDisplay = styled21("div")`
35015
34971
  border-radius: var(--j-radius-md);
35016
34972
  text-align: center;
35017
34973
  `;
35018
- var CheckboxContainer = styled21("div")`
34974
+ var CheckboxContainer = styled20("div")`
35019
34975
  display: flex;
35020
34976
  align-items: flex-start;
35021
34977
  gap: 0.5rem;
35022
34978
  margin-top: 1rem;
35023
34979
  `;
35024
- var CheckboxInput = styled21("input")`
34980
+ var CheckboxInput = styled20("input")`
35025
34981
  width: 1rem;
35026
34982
  height: 1rem;
35027
34983
  margin-top: 0.125rem;
35028
34984
  cursor: pointer;
35029
34985
  accent-color: var(--j-primary-color);
35030
34986
  `;
35031
- var CheckboxLabel = styled21("label")`
34987
+ var CheckboxLabel = styled20("label")`
35032
34988
  font-size: 0.875rem;
35033
34989
  color: var(--j-text-color);
35034
34990
  cursor: pointer;
35035
34991
  line-height: 1.25rem;
35036
34992
  `;
35037
- var EditorContainer = styled21("div")`
34993
+ var EditorContainer = styled20("div")`
35038
34994
  margin-top: 1rem;
35039
34995
  `;
35040
34996
 
35041
34997
  // src/inspector/viewer/page.tsx
35042
- var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
35043
- var BasePageContainer = import_react22.default.forwardRef(
35044
- ({ isTopLevel, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref, ...rest })
34998
+ var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
34999
+ var BasePageContainer = import_react21.default.forwardRef(
35000
+ ({ isTopLevel, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref, ...rest })
35045
35001
  );
35046
- var PageContainer = styled22(BasePageContainer)`
35002
+ var PageContainer = styled21(BasePageContainer)`
35047
35003
  position: absolute;
35048
35004
  z-index: 10;
35049
35005
  inset: 0;
@@ -35051,36 +35007,36 @@ var PageContainer = styled22(BasePageContainer)`
35051
35007
  height: 100%;
35052
35008
  padding: 0 0.75rem;
35053
35009
  `;
35054
- var BackButton = styled22("div")`
35010
+ var BackButton = styled21("div")`
35055
35011
  position: absolute;
35056
35012
  left: 0;
35057
35013
  right: 0;
35058
35014
  top: 0;
35059
35015
  height: 2.5rem;
35060
35016
  `;
35061
- var HeaderContainer = styled22("div")`
35017
+ var HeaderContainer = styled21("div")`
35062
35018
  display: flex;
35063
35019
  justify-content: space-between;
35064
35020
  align-items: center;
35065
35021
  margin-bottom: 1rem;
35066
35022
  `;
35067
- var TitleContainer = styled22("div")`
35023
+ var TitleContainer = styled21("div")`
35068
35024
  display: flex;
35069
35025
  align-items: center;
35070
35026
  gap: 0.75rem;
35071
35027
  `;
35072
- var Title = styled22(Heading)`
35028
+ var Title = styled21(Heading)`
35073
35029
  display: flex;
35074
35030
  flex-direction: column;
35075
35031
  align-items: flex-start;
35076
35032
  gap: 0.25rem;
35077
35033
  `;
35078
- var BadgeContainer = styled22("div")`
35034
+ var BadgeContainer = styled21("div")`
35079
35035
  display: flex;
35080
35036
  align-items: center;
35081
35037
  gap: 0.75rem;
35082
35038
  `;
35083
- var ContentContainer = styled22("div")`
35039
+ var ContentContainer = styled21("div")`
35084
35040
  overflow: auto;
35085
35041
  display: flex;
35086
35042
  flex-direction: column;
@@ -35101,7 +35057,7 @@ function View(props) {
35101
35057
  const { node, onNavigate } = props;
35102
35058
  if (!snapshot || snapshot === "unavailable") return;
35103
35059
  if (type === "costream") {
35104
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
35060
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
35105
35061
  CoStreamView,
35106
35062
  {
35107
35063
  data: snapshot,
@@ -35112,7 +35068,7 @@ function View(props) {
35112
35068
  );
35113
35069
  }
35114
35070
  if (extendedType === "group") {
35115
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
35071
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
35116
35072
  GroupView,
35117
35073
  {
35118
35074
  coValue: value,
@@ -35123,10 +35079,10 @@ function View(props) {
35123
35079
  );
35124
35080
  }
35125
35081
  if (extendedType === "account") {
35126
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(AccountView, { data: snapshot, node, onNavigate });
35082
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AccountView, { data: snapshot, node, onNavigate });
35127
35083
  }
35128
35084
  if (type === "coplaintext") {
35129
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
35085
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
35130
35086
  CoPlainTextView,
35131
35087
  {
35132
35088
  data: snapshot,
@@ -35142,7 +35098,7 @@ function View(props) {
35142
35098
  list.delete(index);
35143
35099
  }
35144
35100
  };
35145
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
35101
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
35146
35102
  TableView,
35147
35103
  {
35148
35104
  data: snapshot,
@@ -35153,10 +35109,10 @@ function View(props) {
35153
35109
  );
35154
35110
  }
35155
35111
  if (extendedType === "record") {
35156
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableView, { data: snapshot, node, onNavigate });
35112
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TableView, { data: snapshot, node, onNavigate });
35157
35113
  }
35158
35114
  if (type === "comap") {
35159
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
35115
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
35160
35116
  CoMapView,
35161
35117
  {
35162
35118
  coValue: value,
@@ -35166,7 +35122,7 @@ function View(props) {
35166
35122
  }
35167
35123
  );
35168
35124
  }
35169
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(GridView, { data: snapshot, onNavigate, node });
35125
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(GridView, { data: snapshot, onNavigate, node });
35170
35126
  }
35171
35127
  function Page(props) {
35172
35128
  const {
@@ -35182,13 +35138,13 @@ function Page(props) {
35182
35138
  const coValue = useResolvedCoValue(coId, node);
35183
35139
  const { value, snapshot, type, extendedType } = coValue;
35184
35140
  if (snapshot === "unavailable") {
35185
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style, children: "Data unavailable" });
35141
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style, children: "Data unavailable" });
35186
35142
  }
35187
35143
  if (!snapshot) {
35188
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style });
35144
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style });
35189
35145
  }
35190
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(PageContainer, { style, className, isTopLevel, children: [
35191
- !isTopLevel && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
35146
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(PageContainer, { style, className, isTopLevel, children: [
35147
+ !isTopLevel && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
35192
35148
  BackButton,
35193
35149
  {
35194
35150
  "aria-label": "Back",
@@ -35198,27 +35154,27 @@ function Page(props) {
35198
35154
  "aria-hidden": "true"
35199
35155
  }
35200
35156
  ),
35201
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HeaderContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(TitleContainer, { children: [
35202
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Title, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { children: [
35157
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HeaderContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(TitleContainer, { children: [
35158
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Title, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { children: [
35203
35159
  name,
35204
- typeof snapshot === "object" && "name" in snapshot ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { style: { color: "#57534e", fontWeight: 500 }, children: [
35160
+ typeof snapshot === "object" && "name" in snapshot ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { style: { color: "#57534e", fontWeight: 500 }, children: [
35205
35161
  " ",
35206
35162
  snapshot.name
35207
35163
  ] }) : null
35208
35164
  ] }) }),
35209
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(BadgeContainer, { children: [
35210
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Badge, { children: type && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TypeIcon, { type, extendedType }) }),
35211
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Badge, { children: coId })
35165
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(BadgeContainer, { children: [
35166
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Badge, { children: type && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TypeIcon, { type, extendedType }) }),
35167
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Badge, { children: coId })
35212
35168
  ] })
35213
35169
  ] }) }),
35214
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(ContentContainer, { children: [
35215
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(View, { ...props, coValue }),
35216
- extendedType !== "account" && extendedType !== "group" && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
35217
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RoleDisplay, { node, value }),
35218
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { muted: true, children: [
35170
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(ContentContainer, { children: [
35171
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(View, { ...props, coValue }),
35172
+ extendedType !== "account" && extendedType !== "group" && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
35173
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RoleDisplay, { node, value }),
35174
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Text, { muted: true, children: [
35219
35175
  "Owned by",
35220
35176
  " ",
35221
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
35177
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
35222
35178
  AccountOrGroupText,
35223
35179
  {
35224
35180
  coId: value.group.id,
@@ -35231,16 +35187,16 @@ function Page(props) {
35231
35187
  )
35232
35188
  ] })
35233
35189
  ] }),
35234
- value && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HistoryView, { coValue: value, node })
35190
+ value && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HistoryView, { coValue: value, node })
35235
35191
  ] })
35236
35192
  ] });
35237
35193
  }
35238
35194
 
35239
35195
  // src/inspector/ui/error-boundary.tsx
35240
- var import_react23 = __toESM(require_react(), 1);
35241
- var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
35242
- import { styled as styled23 } from "goober";
35243
- var ErrorBoundary = class extends import_react23.default.Component {
35196
+ var import_react22 = __toESM(require_react(), 1);
35197
+ var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
35198
+ import { styled as styled22 } from "goober";
35199
+ var ErrorBoundary = class extends import_react22.default.Component {
35244
35200
  constructor(props) {
35245
35201
  super(props);
35246
35202
  this.state = { hasError: false };
@@ -35253,61 +35209,132 @@ var ErrorBoundary = class extends import_react23.default.Component {
35253
35209
  }
35254
35210
  render() {
35255
35211
  if (this.state.hasError) {
35256
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: { padding: "1rem" }, children: [
35257
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StyledHeading2, { children: this.props.title }),
35258
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { mono: true, style: { marginTop: "0.5rem", color: "#ef4444" }, children: this.state.error?.message || "An unexpected error occurred" }),
35259
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("pre", { style: { paddingLeft: "1rem", color: "#ef4444" }, children: this.state.error?.stack })
35212
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { style: { padding: "1rem" }, children: [
35213
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledHeading2, { children: this.props.title }),
35214
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { mono: true, style: { marginTop: "0.5rem", color: "#ef4444" }, children: this.state.error?.message || "An unexpected error occurred" }),
35215
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("pre", { style: { paddingLeft: "1rem", color: "#ef4444" }, children: this.state.error?.stack })
35260
35216
  ] });
35261
35217
  }
35262
35218
  return this.props.children;
35263
35219
  }
35264
35220
  };
35265
- var StyledHeading2 = styled23("h1")`
35221
+ var StyledHeading2 = styled22("h1")`
35266
35222
  font-size: 1.125rem;
35267
35223
  font-weight: 500;
35268
35224
  color: var(--j-text-color-strong);
35269
35225
  `;
35270
35226
 
35271
- // src/inspector/viewer/page-stack.tsx
35272
- var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
35273
- var PageStackContainer = styled24("div")`
35274
- position: relative;
35275
- padding: 0 0.75rem;
35276
- overflow-y: auto;
35277
- flex: 1;
35278
- color: var(--j-text-color);
35279
- font-size: 16px;
35280
- `;
35281
- function PageStack({
35282
- path,
35283
- node,
35284
- goBack,
35285
- addPages,
35286
- children
35287
- }) {
35288
- const page = path[path.length - 1];
35289
- const index = path.length - 1;
35290
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(PageStackContainer, { children: [
35291
- children,
35292
- node && page && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ErrorBoundary, { title: "An error occurred while rendering this CoValue", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
35293
- Page,
35294
- {
35295
- coId: page.coId,
35296
- node,
35297
- name: page.name || page.coId,
35298
- onHeaderClick: goBack,
35299
- onNavigate: addPages,
35300
- isTopLevel: index === path.length - 1
35301
- }
35302
- ) })
35303
- ] }) });
35227
+ // src/inspector/router/context.ts
35228
+ var import_react23 = __toESM(require_react(), 1);
35229
+ var RouterContext = (0, import_react23.createContext)(null);
35230
+ function useRouter() {
35231
+ const context = (0, import_react23.useContext)(RouterContext);
35232
+ if (!context) {
35233
+ throw new Error("useRouter must be used within a RouterProvider");
35234
+ }
35235
+ return context;
35304
35236
  }
35305
35237
 
35306
- // src/inspector/viewer/use-page-path.ts
35238
+ // src/inspector/contexts/node.tsx
35307
35239
  var import_react24 = __toESM(require_react(), 1);
35240
+ var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
35241
+ import { LocalNode } from "cojson";
35242
+ import { WasmCrypto } from "cojson/crypto/WasmCrypto";
35243
+ import { createWebSocketPeer } from "cojson-transport-ws";
35244
+ var NodeContext = (0, import_react24.createContext)({
35245
+ accountID: null,
35246
+ localNode: null,
35247
+ server: "wss://cloud.jazz.tools/",
35248
+ createLocalNode: async () => {
35249
+ throw new Error("createLocalNode not implemented");
35250
+ },
35251
+ reset: () => {
35252
+ throw new Error("reset not implemented");
35253
+ }
35254
+ });
35255
+ var crypto = null;
35256
+ async function getCrypto() {
35257
+ if (crypto) return crypto;
35258
+ crypto = await WasmCrypto.create();
35259
+ return crypto;
35260
+ }
35261
+ function NodeProvider(props) {
35262
+ const [accountID, setAccountID] = (0, import_react24.useState)(
35263
+ props?.accountID ?? null
35264
+ );
35265
+ const [localNode, setLocalNode] = (0, import_react24.useState)(
35266
+ props?.localNode ?? null
35267
+ );
35268
+ const [server, setServer] = (0, import_react24.useState)(
35269
+ props?.server ?? "wss://cloud.jazz.tools/"
35270
+ );
35271
+ (0, import_react24.useEffect)(() => {
35272
+ if (props.localNode !== void 0) setLocalNode(props.localNode);
35273
+ if (props.accountID !== void 0) setAccountID(props.accountID);
35274
+ if (props.server !== void 0) setServer(props.server);
35275
+ }, [props.localNode, props.accountID, props.server]);
35276
+ async function createLocalNode(accountID2, clientSecret, server2) {
35277
+ if (localNode) {
35278
+ localNode.gracefulShutdown();
35279
+ }
35280
+ setLocalNode(null);
35281
+ const wsPeer = createWebSocketPeer({
35282
+ id: "cloud",
35283
+ websocket: new WebSocket(server2),
35284
+ role: "server"
35285
+ });
35286
+ const crypto2 = await getCrypto();
35287
+ const node = await LocalNode.withLoadedAccount({
35288
+ accountID: accountID2,
35289
+ accountSecret: clientSecret,
35290
+ sessionID: crypto2.newRandomSessionID(accountID2),
35291
+ peers: [wsPeer],
35292
+ crypto: crypto2,
35293
+ migration: async () => {
35294
+ console.log("Not running any migration in inspector");
35295
+ }
35296
+ });
35297
+ setLocalNode(node);
35298
+ setAccountID(accountID2);
35299
+ setServer(server2);
35300
+ }
35301
+ function reset() {
35302
+ if (localNode) {
35303
+ localNode.gracefulShutdown();
35304
+ }
35305
+ setLocalNode(null);
35306
+ setAccountID(null);
35307
+ setServer("wss://cloud.jazz.tools/");
35308
+ }
35309
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
35310
+ NodeContext.Provider,
35311
+ {
35312
+ value: { accountID, localNode, server, createLocalNode, reset },
35313
+ children: props.children
35314
+ }
35315
+ );
35316
+ }
35317
+ function useNode() {
35318
+ const context = (0, import_react24.useContext)(NodeContext);
35319
+ if (!context) {
35320
+ throw new Error("useNode must be used within a NodeProvider");
35321
+ }
35322
+ return context;
35323
+ }
35324
+
35325
+ // src/inspector/pages/home.tsx
35326
+ import { styled as styled23 } from "goober";
35327
+ var import_react27 = __toESM(require_react(), 1);
35328
+
35329
+ // src/inspector/router/in-memory-router.tsx
35330
+ var import_react25 = __toESM(require_react(), 1);
35331
+ var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
35308
35332
  var STORAGE_KEY = "jazz-inspector-paths";
35309
- function usePagePath(defaultPath) {
35310
- const [path, setPath] = (0, import_react24.useState)(() => {
35333
+ function InMemoryRouterProvider({
35334
+ children,
35335
+ defaultPath
35336
+ }) {
35337
+ const [path, setPath] = (0, import_react25.useState)(() => {
35311
35338
  if (typeof window === "undefined") return [];
35312
35339
  const stored = localStorage.getItem(STORAGE_KEY);
35313
35340
  if (stored) {
@@ -35319,45 +35346,138 @@ function usePagePath(defaultPath) {
35319
35346
  }
35320
35347
  return defaultPath || [];
35321
35348
  });
35322
- const updatePath = (0, import_react24.useCallback)((newPath) => {
35349
+ const updatePath = (0, import_react25.useCallback)((newPath) => {
35323
35350
  setPath(newPath);
35324
35351
  localStorage.setItem(STORAGE_KEY, JSON.stringify(newPath));
35325
35352
  }, []);
35326
- (0, import_react24.useEffect)(() => {
35353
+ (0, import_react25.useEffect)(() => {
35327
35354
  if (defaultPath && JSON.stringify(path) !== JSON.stringify(defaultPath)) {
35328
35355
  updatePath(defaultPath);
35329
35356
  }
35330
35357
  }, [defaultPath, path, updatePath]);
35331
- const addPages = (0, import_react24.useCallback)(
35332
- (newPages) => {
35358
+ const router = (0, import_react25.useMemo)(() => {
35359
+ const addPages = (newPages) => {
35333
35360
  updatePath([...path, ...newPages]);
35334
- },
35335
- [path, updatePath]
35336
- );
35337
- const goToIndex = (0, import_react24.useCallback)(
35338
- (index) => {
35361
+ };
35362
+ const goToIndex = (index) => {
35339
35363
  updatePath(path.slice(0, index + 1));
35340
- },
35341
- [path, updatePath]
35342
- );
35343
- const setPage = (0, import_react24.useCallback)(
35344
- (coId) => {
35364
+ };
35365
+ const setPage = (coId) => {
35345
35366
  updatePath([{ coId, name: "Root" }]);
35346
- },
35347
- [updatePath]
35348
- );
35349
- const goBack = (0, import_react24.useCallback)(() => {
35350
- if (path.length > 1) {
35367
+ };
35368
+ const goBack = () => {
35351
35369
  updatePath(path.slice(0, path.length - 1));
35352
- }
35370
+ };
35371
+ return {
35372
+ path,
35373
+ addPages,
35374
+ goToIndex,
35375
+ setPage,
35376
+ goBack
35377
+ };
35353
35378
  }, [path, updatePath]);
35354
- return {
35355
- path,
35356
- setPage,
35357
- addPages,
35358
- goToIndex,
35359
- goBack
35379
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(RouterContext.Provider, { value: router, children });
35380
+ }
35381
+
35382
+ // src/inspector/router/hash-router.tsx
35383
+ var import_react26 = __toESM(require_react(), 1);
35384
+ var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
35385
+
35386
+ // src/inspector/pages/home.tsx
35387
+ var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
35388
+ function HomePage() {
35389
+ const { localNode, accountID } = useNode();
35390
+ const { path, setPage } = useRouter();
35391
+ const [coValueId, setCoValueId] = (0, import_react27.useState)("");
35392
+ if (!localNode || !accountID) {
35393
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: "Loading..." });
35394
+ }
35395
+ const handleCoValueIdSubmit = (e) => {
35396
+ e.preventDefault();
35397
+ if (coValueId) {
35398
+ setPage(coValueId);
35399
+ }
35400
+ setCoValueId("");
35360
35401
  };
35402
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
35403
+ CenteredForm,
35404
+ {
35405
+ onSubmit: handleCoValueIdSubmit,
35406
+ "aria-hidden": path.length !== 0,
35407
+ children: [
35408
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Heading, { children: "Jazz CoValue Inspector" }),
35409
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
35410
+ Input,
35411
+ {
35412
+ label: "CoValue ID",
35413
+ className: "font-mono",
35414
+ hideLabel: true,
35415
+ placeholder: "co_z1234567890abcdef123456789",
35416
+ value: coValueId,
35417
+ onChange: (e) => setCoValueId(e.target.value)
35418
+ }
35419
+ ),
35420
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { type: "submit", variant: "primary", children: "Inspect CoValue" }),
35421
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(OrText, { children: "or" }),
35422
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
35423
+ Button,
35424
+ {
35425
+ variant: "secondary",
35426
+ onClick: () => {
35427
+ setPage(accountID);
35428
+ },
35429
+ children: "Inspect my account"
35430
+ }
35431
+ )
35432
+ ]
35433
+ }
35434
+ ) });
35435
+ }
35436
+ var CenteredForm = styled23("form")`
35437
+ display: flex;
35438
+ flex-direction: column;
35439
+ position: relative;
35440
+ top: -1.5rem;
35441
+ justify-content: center;
35442
+ gap: 0.5rem;
35443
+ height: 100%;
35444
+ width: 100%;
35445
+ max-width: 24rem;
35446
+ margin: 0 auto;
35447
+ `;
35448
+ var OrText = styled23("p")`
35449
+ text-align: center;
35450
+ `;
35451
+
35452
+ // src/inspector/viewer/page-stack.tsx
35453
+ var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
35454
+ var PageStackContainer = styled24("article")`
35455
+ position: relative;
35456
+ padding: 0 0.75rem;
35457
+ overflow-y: auto;
35458
+ flex: 1;
35459
+ color: var(--j-text-color);
35460
+ font-size: 16px;
35461
+ `;
35462
+ function PageStack({ homePage }) {
35463
+ const { path, addPages, goBack } = useRouter();
35464
+ const { localNode } = useNode();
35465
+ const page = path[path.length - 1];
35466
+ const index = path.length - 1;
35467
+ if (path.length <= 0) {
35468
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(PageStackContainer, { children: homePage ?? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(HomePage, {}) });
35469
+ }
35470
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(PageStackContainer, { children: localNode && page && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ErrorBoundary, { title: "An error occurred while rendering this CoValue", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
35471
+ Page,
35472
+ {
35473
+ coId: page.coId,
35474
+ node: localNode,
35475
+ name: page.name || page.coId,
35476
+ onHeaderClick: goBack,
35477
+ onNavigate: addPages,
35478
+ isTopLevel: index === path.length - 1
35479
+ }
35480
+ ) }) }) });
35361
35481
  }
35362
35482
 
35363
35483
  // src/inspector/ui/global-styles.tsx
@@ -35436,7 +35556,7 @@ var GlobalStyles = styled25("div")`
35436
35556
  `;
35437
35557
 
35438
35558
  // src/inspector/viewer/inspector-button.tsx
35439
- var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
35559
+ var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
35440
35560
  import { styled as styled26 } from "goober";
35441
35561
  var StyledInspectorButton = styled26("button")`
35442
35562
  position: fixed;
@@ -35480,8 +35600,8 @@ function InspectorButton({
35480
35600
  position = "right",
35481
35601
  ...buttonProps
35482
35602
  }) {
35483
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(StyledInspectorButton, { position, ...buttonProps, children: [
35484
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
35603
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(StyledInspectorButton, { position, ...buttonProps, children: [
35604
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
35485
35605
  JazzIcon,
35486
35606
  {
35487
35607
  xmlns: "http://www.w3.org/2000/svg",
@@ -35489,7 +35609,7 @@ function InspectorButton({
35489
35609
  height: "115",
35490
35610
  viewBox: "0 0 119 115",
35491
35611
  fill: "none",
35492
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
35612
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
35493
35613
  "path",
35494
35614
  {
35495
35615
  fillRule: "evenodd",
@@ -35500,7 +35620,7 @@ function InspectorButton({
35500
35620
  )
35501
35621
  }
35502
35622
  ),
35503
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
35623
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
35504
35624
  "span",
35505
35625
  {
35506
35626
  style: {
@@ -35521,30 +35641,77 @@ function InspectorButton({
35521
35641
  }
35522
35642
 
35523
35643
  // src/inspector/viewer/use-open-inspector.ts
35524
- var import_react25 = __toESM(require_react(), 1);
35644
+ var import_react28 = __toESM(require_react(), 1);
35525
35645
  var STORAGE_KEY2 = "jazz-inspector-open";
35526
35646
  function useOpenInspector() {
35527
- const [open, setOpen] = (0, import_react25.useState)(() => {
35647
+ const [open, setOpen] = (0, import_react28.useState)(() => {
35528
35648
  if (typeof window === "undefined") return false;
35529
35649
  const stored = localStorage.getItem(STORAGE_KEY2);
35530
35650
  return stored ? JSON.parse(stored) : false;
35531
35651
  });
35532
- (0, import_react25.useEffect)(() => {
35652
+ (0, import_react28.useEffect)(() => {
35533
35653
  localStorage.setItem(STORAGE_KEY2, JSON.stringify(open));
35534
35654
  }, [open]);
35535
35655
  return [open, setOpen];
35536
35656
  }
35537
35657
 
35658
+ // src/inspector/viewer/header.tsx
35659
+ var import_react31 = __toESM(require_react(), 1);
35660
+ import { styled as styled28 } from "goober";
35661
+
35662
+ // src/inspector/viewer/breadcrumbs.tsx
35663
+ var import_react29 = __toESM(require_react(), 1);
35664
+ import { styled as styled27 } from "goober";
35665
+ var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
35666
+ var BreadcrumbsContainer = styled27("div")`
35667
+ position: relative;
35668
+ z-index: 20;
35669
+ flex: 1;
35670
+ display: flex;
35671
+ align-items: center;
35672
+ `;
35673
+ var Separator = styled27("span")`
35674
+ padding: 0 0.125rem;
35675
+ `;
35676
+ var Breadcrumbs = () => {
35677
+ const { path, goToIndex } = useRouter();
35678
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(BreadcrumbsContainer, { children: [
35679
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
35680
+ Button,
35681
+ {
35682
+ variant: "link",
35683
+ style: { padding: "0 0.25rem" },
35684
+ onClick: () => goToIndex(-1),
35685
+ children: "Home"
35686
+ }
35687
+ ),
35688
+ path.map((page, index) => {
35689
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react29.default.Fragment, { children: [
35690
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Separator, { "aria-hidden": true, children: "/" }),
35691
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
35692
+ Button,
35693
+ {
35694
+ variant: "link",
35695
+ style: { padding: "0 0.25rem" },
35696
+ onClick: () => goToIndex(index),
35697
+ children: index === 0 ? page.name || "Root" : page.name
35698
+ }
35699
+ )
35700
+ ] }, page.coId);
35701
+ })
35702
+ ] });
35703
+ };
35704
+
35538
35705
  // src/inspector/viewer/delete-local-data.tsx
35539
- var import_react26 = __toESM(require_react(), 1);
35540
- var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
35706
+ var import_react30 = __toESM(require_react(), 1);
35707
+ var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
35541
35708
  var DELETE_LOCAL_DATA_STRING = "delete my local data";
35542
35709
  function DeleteLocalData() {
35543
- const [showDeleteModal, setShowDeleteModal] = (0, import_react26.useState)(false);
35544
- const [confirmDeleteString, setConfirmDeleteString] = (0, import_react26.useState)("");
35545
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
35546
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { variant: "destructive", onClick: () => setShowDeleteModal(true), children: "Delete my local data" }),
35547
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
35710
+ const [showDeleteModal, setShowDeleteModal] = (0, import_react30.useState)(false);
35711
+ const [confirmDeleteString, setConfirmDeleteString] = (0, import_react30.useState)("");
35712
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
35713
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, { variant: "destructive", onClick: () => setShowDeleteModal(true), children: "Delete my local data" }),
35714
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
35548
35715
  Modal,
35549
35716
  {
35550
35717
  isOpen: showDeleteModal,
@@ -35552,7 +35719,7 @@ function DeleteLocalData() {
35552
35719
  heading: "Delete Local Data",
35553
35720
  showButtons: false,
35554
35721
  children: [
35555
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
35722
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
35556
35723
  "div",
35557
35724
  {
35558
35725
  style: {
@@ -35563,33 +35730,33 @@ function DeleteLocalData() {
35563
35730
  gap: "0.5rem"
35564
35731
  },
35565
35732
  children: [
35566
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { children: [
35733
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { children: [
35567
35734
  "This action ",
35568
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "cannot" }),
35735
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "cannot" }),
35569
35736
  " be undone."
35570
35737
  ] }),
35571
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { children: [
35738
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { children: [
35572
35739
  "Be aware that the following data will be",
35573
35740
  " ",
35574
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "permanently" }),
35741
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "permanently" }),
35575
35742
  " deleted:"
35576
35743
  ] }),
35577
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("ul", { style: { listStyleType: "disc", paddingLeft: "1rem" }, children: [
35578
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("li", { children: [
35744
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("ul", { style: { listStyleType: "disc", paddingLeft: "1rem" }, children: [
35745
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("li", { children: [
35579
35746
  "Unsynced data for ",
35580
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "all apps" }),
35747
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "all apps" }),
35581
35748
  " on",
35582
35749
  " ",
35583
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("code", { children: window.location.origin })
35750
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("code", { children: window.location.origin })
35584
35751
  ] }),
35585
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { children: "Accounts" }),
35586
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { children: "Logged in sessions" })
35752
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("li", { children: "Accounts" }),
35753
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("li", { children: "Logged in sessions" })
35587
35754
  ] }),
35588
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", {})
35755
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", {})
35589
35756
  ]
35590
35757
  }
35591
35758
  ),
35592
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
35759
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
35593
35760
  Input,
35594
35761
  {
35595
35762
  label: `Type "${DELETE_LOCAL_DATA_STRING}" to confirm`,
@@ -35600,7 +35767,7 @@ function DeleteLocalData() {
35600
35767
  }
35601
35768
  }
35602
35769
  ),
35603
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
35770
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
35604
35771
  "p",
35605
35772
  {
35606
35773
  style: {
@@ -35610,14 +35777,14 @@ function DeleteLocalData() {
35610
35777
  flexDirection: "column",
35611
35778
  gap: "0.5rem"
35612
35779
  },
35613
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("small", { children: [
35780
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("small", { children: [
35614
35781
  "Data synced to a sync server will ",
35615
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "not" }),
35782
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("strong", { children: "not" }),
35616
35783
  " be deleted, and will be synced when you log in again."
35617
35784
  ] })
35618
35785
  }
35619
35786
  ),
35620
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
35787
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
35621
35788
  "div",
35622
35789
  {
35623
35790
  style: {
@@ -35627,8 +35794,8 @@ function DeleteLocalData() {
35627
35794
  gap: "0.5rem"
35628
35795
  },
35629
35796
  children: [
35630
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { variant: "secondary", onClick: () => setShowDeleteModal(false), children: "Cancel" }),
35631
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
35797
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, { variant: "secondary", onClick: () => setShowDeleteModal(false), children: "Cancel" }),
35798
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
35632
35799
  Button,
35633
35800
  {
35634
35801
  variant: "destructive",
@@ -35654,136 +35821,96 @@ function DeleteLocalData() {
35654
35821
  ] });
35655
35822
  }
35656
35823
 
35657
- // src/inspector/viewer/new-app.tsx
35658
- var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
35659
- var InspectorContainer = styled27("div")`
35660
- position: fixed;
35661
- height: 50vh;
35662
- max-height: 800px;
35663
- display: flex;
35664
- flex-direction: column;
35665
- bottom: 0;
35666
- left: 0;
35667
- width: 100%;
35668
- background-color: white;
35669
- border-top: 1px solid var(--j-border-color);
35670
- color: var(--j-text-color);
35671
-
35672
- @media (prefers-color-scheme: dark) {
35673
- background-color: var(--j-background);
35674
- }
35675
- `;
35676
- var HeaderContainer2 = styled27("div")`
35824
+ // src/inspector/viewer/header.tsx
35825
+ var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
35826
+ function Header({
35827
+ showDeleteLocalData = false,
35828
+ showClose = false,
35829
+ onClose,
35830
+ children
35831
+ }) {
35832
+ const [coValueId, setCoValueId] = (0, import_react31.useState)("");
35833
+ const { path, setPage } = useRouter();
35834
+ const handleCoValueIdSubmit = (e) => {
35835
+ e.preventDefault();
35836
+ if (coValueId) {
35837
+ setPage(coValueId);
35838
+ }
35839
+ setCoValueId("");
35840
+ };
35841
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(HeaderContainer2, { children: [
35842
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Breadcrumbs, {}),
35843
+ path.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Form, { onSubmit: handleCoValueIdSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
35844
+ Input,
35845
+ {
35846
+ label: "CoValue ID",
35847
+ style: { fontFamily: "monospace" },
35848
+ hideLabel: true,
35849
+ placeholder: "co_z1234567890abcdef123456789",
35850
+ value: coValueId,
35851
+ onChange: (e) => setCoValueId(e.target.value)
35852
+ }
35853
+ ) }),
35854
+ children,
35855
+ showDeleteLocalData && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DeleteLocalData, {}),
35856
+ showClose && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Button, { variant: "plain", type: "button", onClick: onClose, children: "Close" })
35857
+ ] });
35858
+ }
35859
+ var HeaderContainer2 = styled28("div")`
35677
35860
  display: flex;
35678
35861
  align-items: center;
35679
35862
  gap: 1rem;
35680
35863
  padding: 0 0.75rem;
35681
35864
  margin: 0.75rem 0;
35682
35865
  `;
35683
- var Form = styled27("form")`
35866
+ var Form = styled28("form")`
35684
35867
  width: 24rem;
35685
35868
  `;
35686
- var InitialForm = styled27("form")`
35687
- display: flex;
35688
- flex-direction: column;
35689
- position: relative;
35690
- top: -1.5rem;
35691
- justify-content: center;
35692
- gap: 0.5rem;
35693
- height: 100%;
35694
- width: 100%;
35695
- max-width: 24rem;
35696
- margin: 0 auto;
35697
- `;
35698
- var OrText = styled27("p")`
35699
- text-align: center;
35700
- `;
35701
- function JazzInspectorInternal({
35869
+
35870
+ // src/inspector/in-app.tsx
35871
+ var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
35872
+ function InspectorInApp({
35702
35873
  position = "right",
35703
35874
  localNode,
35704
35875
  accountId
35705
35876
  }) {
35706
35877
  const [open, setOpen] = useOpenInspector();
35707
- const [coValueId, setCoValueId] = (0, import_react27.useState)("");
35708
- const { path, addPages, goToIndex, goBack, setPage } = usePagePath();
35709
- const handleCoValueIdSubmit = (e) => {
35710
- e.preventDefault();
35711
- if (coValueId) {
35712
- setPage(coValueId);
35713
- }
35714
- setCoValueId("");
35715
- };
35716
35878
  if (!open) {
35717
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(InspectorButton, { position, onClick: () => setOpen(true) });
35879
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(InspectorButton, { position, onClick: () => setOpen(true) });
35718
35880
  }
35719
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(InspectorContainer, { as: GlobalStyles, style: { zIndex: 999 }, children: [
35720
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(HeaderContainer2, { children: [
35721
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Breadcrumbs, { path, onBreadcrumbClick: goToIndex }),
35722
- path.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Form, { onSubmit: handleCoValueIdSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
35723
- Input,
35724
- {
35725
- label: "CoValue ID",
35726
- style: { fontFamily: "monospace" },
35727
- hideLabel: true,
35728
- placeholder: "co_z1234567890abcdef123456789",
35729
- value: coValueId,
35730
- onChange: (e) => setCoValueId(e.target.value)
35731
- }
35732
- ) }),
35733
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DeleteLocalData, {}),
35734
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Button, { variant: "plain", type: "button", onClick: () => setOpen(false), children: "Close" })
35735
- ] }),
35736
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
35737
- PageStack,
35881
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(NodeProvider, { localNode: localNode ?? null, accountID: accountId ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(InMemoryRouterProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(InspectorContainer, { as: GlobalStyles, style: { zIndex: 999 }, children: [
35882
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
35883
+ Header,
35738
35884
  {
35739
- path,
35740
- node: localNode,
35741
- goBack,
35742
- addPages,
35743
- children: path.length <= 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
35744
- InitialForm,
35745
- {
35746
- onSubmit: handleCoValueIdSubmit,
35747
- "aria-hidden": path.length !== 0,
35748
- children: [
35749
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Heading, { children: "Jazz CoValue Inspector" }),
35750
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
35751
- Input,
35752
- {
35753
- label: "CoValue ID",
35754
- style: { minWidth: "21rem", fontFamily: "monospace" },
35755
- hideLabel: true,
35756
- placeholder: "co_z1234567890abcdef123456789",
35757
- value: coValueId,
35758
- onChange: (e) => setCoValueId(e.target.value)
35759
- }
35760
- ),
35761
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Button, { type: "submit", variant: "primary", children: "Inspect CoValue" }),
35762
- accountId && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
35763
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OrText, { children: "or" }),
35764
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
35765
- Button,
35766
- {
35767
- variant: "secondary",
35768
- onClick: () => {
35769
- setCoValueId(accountId);
35770
- setPage(accountId);
35771
- },
35772
- children: "Inspect my account"
35773
- }
35774
- )
35775
- ] })
35776
- ]
35777
- }
35778
- )
35885
+ showDeleteLocalData: true,
35886
+ showClose: true,
35887
+ onClose: () => setOpen(false)
35779
35888
  }
35780
- )
35781
- ] });
35889
+ ),
35890
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PageStack, {})
35891
+ ] }) }) });
35782
35892
  }
35893
+ var InspectorContainer = styled29("div")`
35894
+ position: fixed;
35895
+ height: 50vh;
35896
+ max-height: 800px;
35897
+ display: flex;
35898
+ flex-direction: column;
35899
+ bottom: 0;
35900
+ left: 0;
35901
+ width: 100%;
35902
+ background-color: white;
35903
+ border-top: 1px solid var(--j-border-color);
35904
+ color: var(--j-text-color);
35905
+
35906
+ @media (prefers-color-scheme: dark) {
35907
+ background-color: var(--j-background);
35908
+ }
35909
+ `;
35783
35910
 
35784
35911
  // src/inspector/custom-element.tsx
35785
- var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
35786
- setup(import_react28.default.createElement);
35912
+ var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
35913
+ setup(import_react32.default.createElement);
35787
35914
  var JazzInspectorElement = class extends HTMLElement {
35788
35915
  constructor() {
35789
35916
  super(...arguments);
@@ -35825,8 +35952,8 @@ var JazzInspectorElement = class extends HTMLElement {
35825
35952
  return;
35826
35953
  }
35827
35954
  this.root?.render(
35828
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
35829
- JazzInspectorInternal,
35955
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
35956
+ InspectorInApp,
35830
35957
  {
35831
35958
  localNode: this.account.$jazz.localNode,
35832
35959
  accountId: this.account.$jazz.raw.id
@@ -35951,4 +36078,4 @@ react/cjs/react-jsx-runtime.development.js:
35951
36078
  * LICENSE file in the root directory of this source tree.
35952
36079
  *)
35953
36080
  */
35954
- //# sourceMappingURL=custom-element-P76EIWEV.js.map
36081
+ //# sourceMappingURL=custom-element-GJVBPZES.js.map