reflet-sdk 0.7.4 → 0.7.6

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 (34) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +35 -4
  3. package/dist/desktop.d.ts +24 -0
  4. package/dist/desktop.d.ts.map +1 -0
  5. package/dist/desktop.js +118 -0
  6. package/dist/desktop.js.map +1 -0
  7. package/dist/{devtools-layer-CcTmlikp.js → devtools-layer-xN47FKpW.js} +5 -5
  8. package/dist/devtools-layer-xN47FKpW.js.map +1 -0
  9. package/dist/devtools-next.d.ts.map +1 -1
  10. package/dist/devtools-next.js +1 -1
  11. package/dist/{devtools-styles-teRMfSzW.js → devtools-styles-DQpiubGB.js} +26 -8
  12. package/dist/devtools-styles-DQpiubGB.js.map +1 -0
  13. package/dist/devtools-vite.js +2 -1
  14. package/dist/devtools-vite.js.map +1 -1
  15. package/dist/feedback.d.ts +7 -3
  16. package/dist/feedback.d.ts.map +1 -1
  17. package/dist/feedback.js +23 -13
  18. package/dist/feedback.js.map +1 -1
  19. package/dist/{handler-B3_PQB1q.js → handler-ndF3gZBx.js} +11 -416
  20. package/dist/handler-ndF3gZBx.js.map +1 -0
  21. package/dist/reflet-proxy-BW6q9xds.js +467 -0
  22. package/dist/reflet-proxy-BW6q9xds.js.map +1 -0
  23. package/dist/{submit-CG4LXioK.js → submit-DsJwTy3X.js} +25 -9
  24. package/dist/submit-DsJwTy3X.js.map +1 -0
  25. package/dist/{team-layer-zLj_QPQX.js → team-layer-VlQtvR5O.js} +127 -57
  26. package/dist/team-layer-VlQtvR5O.js.map +1 -0
  27. package/dist/team-tools-bridge-C51PpkUI.d.ts +31 -0
  28. package/dist/team-tools-bridge-C51PpkUI.d.ts.map +1 -0
  29. package/package.json +5 -1
  30. package/dist/devtools-layer-CcTmlikp.js.map +0 -1
  31. package/dist/devtools-styles-teRMfSzW.js.map +0 -1
  32. package/dist/handler-B3_PQB1q.js.map +0 -1
  33. package/dist/submit-CG4LXioK.js.map +0 -1
  34. package/dist/team-layer-zLj_QPQX.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"devtools-next.d.ts","names":[],"sources":["../src/devtools/server/handler.ts","../src/devtools/server/next.ts"],"mappings":";;KA8BY,mBAAmB,SAAS,YAAY,QAAQ;;;iBCzB3C;EACf,KAAK;EACL,MAAM;;;;;;wBAOQ,oBACd,UAAS,wBACR;qBAcU,KAAG;qBACH,MAAI"}
1
+ {"version":3,"file":"devtools-next.d.ts","names":[],"sources":["../src/devtools/server/handler.ts","../src/devtools/server/next.ts"],"mappings":";;KA6BY,mBAAmB,SAAS,YAAY,QAAQ;;;iBCxB3C;EACf,KAAK;EACL,MAAM;;;;;;wBAOQ,oBACd,UAAS,wBACR;qBAcU,KAAG;qBACH,MAAI"}
@@ -1,4 +1,4 @@
1
- import { t as createDevtoolsHandler } from "./handler-B3_PQB1q.js";
1
+ import { t as createDevtoolsHandler } from "./handler-ndF3gZBx.js";
2
2
  //#region src/devtools/server/next.ts
3
3
  /**
4
4
  * Route handlers for `app/api/reflet-devtools/[...path]/route.ts`. They answer
@@ -1,5 +1,5 @@
1
1
  import { a as EDITORS, n as DEVTOOLS_REQUEST_HEADER, r as DEVTOOLS_ROUTE_BASE, t as DEVTOOLS_ENDPOINTS } from "./protocol-cJVVwnPe.js";
2
- import { B as clip, D as MoreIcon, G as describeElement, K as getElementRect, M as TargetIcon, O as PencilIcon, R as DEFAULT_WIDGET_LABELS, S as CheckIcon, T as GripIcon, W as buildSelector, Y as redactUrl, Z as inspectReactElement, _ as matchesHotkey, a as uploadBlob, c as useFloatingPosition, g as isSubmitEnter, it as releaseCapture, j as Svg, l as onViewportChange, m as startsInWidget, o as ElementPicker, p as listenToKeydown, q as REDACT_ATTRIBUTE, s as isWidgetOwned, tt as captureViewport, u as visibleViewport, w as CloseIcon } from "./submit-CG4LXioK.js";
2
+ import { E as GripIcon, G as buildSelector, J as REDACT_ATTRIBUTE, K as describeElement, M as Svg, N as TargetIcon, O as MoreIcon, Q as inspectReactElement, S as CheckIcon, T as CodeIcon, V as clip, X as redactUrl, _ as matchesHotkey, a as uploadBlob, at as releaseCapture, c as useFloatingPosition, g as isSubmitEnter, k as PencilIcon, l as onViewportChange, m as startsInWidget, nt as captureViewport, o as ElementPicker, p as listenToKeydown, q as getElementRect, s as isWidgetOwned, u as visibleViewport, w as CloseIcon, z as DEFAULT_WIDGET_LABELS } from "./submit-DsJwTy3X.js";
3
3
  import { t as REFLET_Z_INDEX } from "./z-index-CwokqVq_.js";
4
4
  import { z } from "zod";
5
5
  import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
@@ -1070,6 +1070,27 @@ function teamTransport(options) {
1070
1070
  return schema.parse(await response.json().catch(() => null));
1071
1071
  } };
1072
1072
  }
1073
+ function parseReplyBody(body) {
1074
+ try {
1075
+ return JSON.parse(body);
1076
+ } catch {
1077
+ return null;
1078
+ }
1079
+ }
1080
+ /** Calls go through the desktop app's privileged process, which holds the credential. Absent keys stay absent: IPC keeps an `undefined` value. */
1081
+ function bridgeTransport(bridge) {
1082
+ return { async request({ body, method, path, query, schema }) {
1083
+ const reply = await bridge.request({
1084
+ method,
1085
+ path,
1086
+ ...method === "POST" && { body: JSON.stringify(body ?? {}) },
1087
+ ...query && { query }
1088
+ });
1089
+ const payload = parseReplyBody(reply.body);
1090
+ if (!(reply.status >= 200 && reply.status < 300)) throw toSessionApiError(payload, reply.status);
1091
+ return schema.parse(payload);
1092
+ } };
1093
+ }
1073
1094
  function uploadSessionBlob(uploadUrl, blob) {
1074
1095
  return uploadBlob(uploadUrl, {
1075
1096
  blob,
@@ -6247,9 +6268,6 @@ function PanelIcon() {
6247
6268
  y: "4"
6248
6269
  }), /* @__PURE__ */ jsx("path", { d: "M14 4v16" })] });
6249
6270
  }
6250
- function CodeIcon() {
6251
- return /* @__PURE__ */ jsx(Svg, { children: /* @__PURE__ */ jsx("path", { d: "m8 7-5 5 5 5M16 7l5 5-5 5" }) });
6252
- }
6253
6271
  function RefreshIcon() {
6254
6272
  return /* @__PURE__ */ jsx(Svg, { children: /* @__PURE__ */ jsx("path", { d: "M20 11a8 8 0 0 0-14.5-4.5L4 8M4 4v4h4M4 13a8 8 0 0 0 14.5 4.5L20 16M20 20v-4h-4" }) });
6255
6273
  }
@@ -9726,7 +9744,7 @@ const DEVTOOLS_STYLES = `
9726
9744
  .dt-resize[data-axis="width"]::after { top: 50%; left: 3px; width: 4px; height: 36px; translate: 0 -50%; }
9727
9745
  .dt-resize[data-axis="height"]::after { left: 50%; top: 3px; width: 36px; height: 4px; translate: -50% 0; }
9728
9746
  .dt-resize:hover::after, .dt-resize:focus-visible::after, .dt-resize:active::after { opacity: .5; }
9729
- .dt-sheet-head { position: relative; display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 6px; border-bottom: 1px solid var(--rf-border); }
9747
+ .dt-sheet-head { position: relative; display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 6px; }
9730
9748
  .dt-sheet-head > :not(.dt-sheet-drag) { position: relative; z-index: 1; }
9731
9749
  .dt-sheet-head .icon-btn { width: 32px; height: 32px; }
9732
9750
  .dt-sheet .dt-sheet-drag { position: absolute; inset: 0; z-index: 0; padding: 0; border-radius: 0; cursor: grab; touch-action: none; }
@@ -9818,7 +9836,7 @@ const DEVTOOLS_STYLES = `
9818
9836
  .dt-menu-item:hover, .dt-menu-item:focus-visible { background: var(--rf-bg-hover); outline: none; }
9819
9837
  .dt-menu-item[data-variant="danger"] { color: var(--rf-danger); }
9820
9838
  .dt-menu-check { display: inline-flex; width: 14px; color: var(--rf-accent); }
9821
- .dt-sheet-account { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border-top: 1px solid var(--rf-border); }
9839
+ .dt-sheet-account { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 8px 8px; }
9822
9840
  .dt-sheet-account > .dt-meta { flex: 1 1 160px; padding-inline: 4px; }
9823
9841
  .dt-sheet-account > .dt-menu { flex: 1; min-width: 0; }
9824
9842
  .dt-sheet-account .dt-menu-list { left: 0; }
@@ -9835,6 +9853,6 @@ const DEVTOOLS_STYLES = `
9835
9853
  .dt-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
9836
9854
  `;
9837
9855
  //#endregion
9838
- export { searchCode as A, devtoolsTransport as C, fetchBoardFeedback as D, disconnectBoard as E, settle as F, sessionApiErrorSchema as I, Notices as L, committed as M, describeStorageFailure as N, fetchSourceFile as O, openDatabase as P, announce as R, purgeAccount as S, callReflet as T, RecordingLayer as _, SHEET_TABS as a, failureMessage as b, AccountNote as c, sessionSheetPlace as d, useSessionNavigation as f, copyToClipboard as g, ViewOptionsIcon as h, DevtoolsBarButtons as i, startBoardConnect as j, probeDevRoute as k, SESSIONS_STYLES as l, RefreshIcon as m, DevtoolsSheet as n, SessionsBarButton as o, Menu as p, DevtoolsBar as r, AccountFooter as s, DEVTOOLS_STYLES as t, SessionsPanel as u, countLabel as v, teamTransport as w, useWorkspaceLoader as x, SessionWorkspaceProvider as y, reportFailure as z };
9856
+ export { probeDevRoute as A, reportFailure as B, bridgeTransport as C, disconnectBoard as D, callReflet as E, openDatabase as F, settle as I, sessionApiErrorSchema as L, startBoardConnect as M, committed as N, fetchBoardFeedback as O, describeStorageFailure as P, Notices as R, purgeAccount as S, teamTransport as T, RecordingLayer as _, SHEET_TABS as a, failureMessage as b, AccountNote as c, sessionSheetPlace as d, useSessionNavigation as f, copyToClipboard as g, ViewOptionsIcon as h, DevtoolsBarButtons as i, searchCode as j, fetchSourceFile as k, SESSIONS_STYLES as l, RefreshIcon as m, DevtoolsSheet as n, SessionsBarButton as o, Menu as p, DevtoolsBar as r, AccountFooter as s, DEVTOOLS_STYLES as t, SessionsPanel as u, countLabel as v, devtoolsTransport as w, useWorkspaceLoader as x, SessionWorkspaceProvider as y, announce as z };
9839
9857
 
9840
- //# sourceMappingURL=devtools-styles-teRMfSzW.js.map
9858
+ //# sourceMappingURL=devtools-styles-DQpiubGB.js.map