@burdenoff/fe-libs 2026.1005.1 → 2026.1005.3

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 (108) hide show
  1. package/dist/chrome/ContextSwitcher.d.ts +2 -0
  2. package/dist/chrome/ContextSwitcher.d.ts.map +1 -1
  3. package/dist/chrome/ContextSwitcher.js +70 -67
  4. package/dist/chrome/contextSwitcher/ProjectList.d.ts +1 -0
  5. package/dist/chrome/contextSwitcher/ProjectList.d.ts.map +1 -1
  6. package/dist/chrome/contextSwitcher/ProjectList.js +18 -5
  7. package/dist/node_modules/fflate/esm/browser.js +3 -3
  8. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +51 -51
  9. package/dist/node_modules/pdfjs-dist/build/pdf.js +2268 -1656
  10. package/dist/node_modules/pdfjs-dist/build/pdf.worker.min.js +8719 -7535
  11. package/dist/shared/assistant/attachments.js +1 -0
  12. package/dist/shared/assistant/i18nManifest.d.ts +4 -0
  13. package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
  14. package/dist/shared/assistant/i18nManifest.js +4 -0
  15. package/dist/shared/assistant/images.js +1 -1
  16. package/dist/shared/assistant/index.d.ts +16 -0
  17. package/dist/shared/assistant/index.d.ts.map +1 -1
  18. package/dist/shared/assistant/runtime.js +1 -0
  19. package/dist/shared/assistant/speech/browserSpeechEngine.d.ts.map +1 -1
  20. package/dist/shared/assistant/speech/browserSpeechEngine.js +46 -45
  21. package/dist/shared/assistant/speech/createSpeechEngine.js +1 -1
  22. package/dist/shared/assistant/speech/hostedTtsSpeechEngine.d.ts.map +1 -1
  23. package/dist/shared/assistant/speech/hostedTtsSpeechEngine.js +80 -79
  24. package/dist/shared/assistant/store.d.ts +3 -0
  25. package/dist/shared/assistant/store.d.ts.map +1 -1
  26. package/dist/shared/assistant/store.js +43 -35
  27. package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
  28. package/dist/shared/assistant/ui/AssistantChatArea.js +1076 -1074
  29. package/dist/shared/assistant/ui/AssistantMoreMenu.d.ts.map +1 -1
  30. package/dist/shared/assistant/ui/AssistantMoreMenu.js +59 -57
  31. package/dist/shared/assistant/ui/composer/AssistantHandsFreeInterruptToggle.d.ts +17 -0
  32. package/dist/shared/assistant/ui/composer/AssistantHandsFreeInterruptToggle.d.ts.map +1 -0
  33. package/dist/shared/assistant/ui/composer/AssistantHandsFreeInterruptToggle.js +34 -0
  34. package/dist/shared/assistant/ui/useVoiceSession.d.ts +29 -2
  35. package/dist/shared/assistant/ui/useVoiceSession.d.ts.map +1 -1
  36. package/dist/shared/assistant/ui/useVoiceSession.js +247 -213
  37. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +2 -0
  38. package/dist/shared/assistant/uiActions/deixis.js +1 -1
  39. package/dist/shared/assistant/voice/handsfree/audioTrackTransport.d.ts +33 -0
  40. package/dist/shared/assistant/voice/handsfree/audioTrackTransport.d.ts.map +1 -0
  41. package/dist/shared/assistant/voice/handsfree/audioTrackTransport.js +98 -0
  42. package/dist/shared/assistant/voice/handsfree/backendStreamTransport.d.ts +34 -0
  43. package/dist/shared/assistant/voice/handsfree/backendStreamTransport.d.ts.map +1 -0
  44. package/dist/shared/assistant/voice/handsfree/backendStreamTransport.js +130 -0
  45. package/dist/shared/assistant/voice/handsfree/bargeIn.d.ts +43 -0
  46. package/dist/shared/assistant/voice/handsfree/bargeIn.d.ts.map +1 -0
  47. package/dist/shared/assistant/voice/handsfree/bargeIn.js +32 -0
  48. package/dist/shared/assistant/voice/handsfree/captureWorklet.d.ts +47 -0
  49. package/dist/shared/assistant/voice/handsfree/captureWorklet.d.ts.map +1 -0
  50. package/dist/shared/assistant/voice/handsfree/captureWorklet.js +85 -0
  51. package/dist/shared/assistant/voice/handsfree/echoGate.d.ts +140 -0
  52. package/dist/shared/assistant/voice/handsfree/echoGate.d.ts.map +1 -0
  53. package/dist/shared/assistant/voice/handsfree/echoGate.js +198 -0
  54. package/dist/shared/assistant/voice/handsfree/handsFreeController.d.ts +77 -0
  55. package/dist/shared/assistant/voice/handsfree/handsFreeController.d.ts.map +1 -0
  56. package/dist/shared/assistant/voice/handsfree/handsFreeController.js +126 -0
  57. package/dist/shared/assistant/voice/handsfree/handsFreeRuntime.d.ts +15 -0
  58. package/dist/shared/assistant/voice/handsfree/handsFreeRuntime.d.ts.map +1 -0
  59. package/dist/shared/assistant/voice/handsfree/handsFreeRuntime.js +78 -0
  60. package/dist/shared/assistant/voice/handsfree/handsFreeSetting.d.ts +26 -0
  61. package/dist/shared/assistant/voice/handsfree/handsFreeSetting.d.ts.map +1 -0
  62. package/dist/shared/assistant/voice/handsfree/handsFreeSetting.js +25 -0
  63. package/dist/shared/assistant/voice/handsfree/micCapture.d.ts +21 -0
  64. package/dist/shared/assistant/voice/handsfree/micCapture.d.ts.map +1 -0
  65. package/dist/shared/assistant/voice/handsfree/micCapture.js +73 -0
  66. package/dist/shared/assistant/voice/handsfree/playbackReference.d.ts +38 -0
  67. package/dist/shared/assistant/voice/handsfree/playbackReference.d.ts.map +1 -0
  68. package/dist/shared/assistant/voice/handsfree/playbackReference.js +55 -0
  69. package/dist/shared/assistant/voice/handsfree/preRollRing.d.ts +32 -0
  70. package/dist/shared/assistant/voice/handsfree/preRollRing.d.ts.map +1 -0
  71. package/dist/shared/assistant/voice/handsfree/preRollRing.js +34 -0
  72. package/dist/shared/assistant/voice/handsfree/sttTransport.d.ts +94 -0
  73. package/dist/shared/assistant/voice/handsfree/sttTransport.d.ts.map +1 -0
  74. package/dist/shared/assistant/voice/handsfree/sttTransport.js +27 -0
  75. package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.d.ts +33 -0
  76. package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.d.ts.map +1 -0
  77. package/dist/shared/assistant/voice/handsfree/useHandsFreeInterrupt.js +70 -0
  78. package/dist/shared/assistant/voice/handsfree/vad.d.ts +55 -0
  79. package/dist/shared/assistant/voice/handsfree/vad.d.ts.map +1 -0
  80. package/dist/shared/assistant/voice/handsfree/vad.js +41 -0
  81. package/dist/shared/assistant/voice/handsfree/webSpeechTransport.d.ts +3 -0
  82. package/dist/shared/assistant/voice/handsfree/webSpeechTransport.d.ts.map +1 -0
  83. package/dist/shared/assistant/voice/handsfree/webSpeechTransport.js +16 -0
  84. package/dist/shared/assistant/voice/voiceSession.d.ts +9 -0
  85. package/dist/shared/assistant/voice/voiceSession.d.ts.map +1 -1
  86. package/dist/shared/assistant/voice/voiceSession.js +2 -2
  87. package/dist/shared/assistant/voice/voiceTranscript.js +14 -14
  88. package/dist/shared/config/gatewayUrls.js +2 -2
  89. package/dist/shared/graphql/workspaceToken.d.ts +1 -0
  90. package/dist/shared/graphql/workspaceToken.d.ts.map +1 -1
  91. package/dist/shared/graphql/workspaceToken.js +18 -14
  92. package/dist/shared/plugins/iframe-mount/client/message-bus.js +1 -0
  93. package/dist/shared/plugins/iframe-mount/client/rpc.js +1 -0
  94. package/dist/shared/providers/shell/ActiveContextProvider.d.ts.map +1 -1
  95. package/dist/shared/providers/shell/ActiveContextProvider.js +165 -144
  96. package/dist/shared/providers/shell/AuthTokenProvider.d.ts.map +1 -1
  97. package/dist/shared/providers/shell/AuthTokenProvider.js +51 -46
  98. package/dist/shared/providers/shell/WorkspaceWideSelection.d.ts +10 -0
  99. package/dist/shared/providers/shell/WorkspaceWideSelection.d.ts.map +1 -0
  100. package/dist/shared/providers/shell/WorkspaceWideSelection.js +37 -0
  101. package/dist/shared/providers/shell/index.d.ts +2 -0
  102. package/dist/shared/providers/shell/index.d.ts.map +1 -1
  103. package/dist/shared/tours/TourTooltip.js +8 -8
  104. package/dist/shared/utils/format.js +1 -1
  105. package/dist/shared/utils/gatewayFetchRewrite.js +1 -1
  106. package/dist/shared-assistant.js +218 -202
  107. package/dist/shared-providers-shell.js +25 -24
  108. package/package.json +18 -8
@@ -11,6 +11,8 @@ export interface ContextSwitcherProps {
11
11
  onOrganizationChange?: (org: Organization) => void;
12
12
  onWorkspaceChange?: (workspace: Workspace) => void;
13
13
  onProjectChange?: (project: Project) => void;
14
+ /** Explicit workspace scope, preserving the existing project callback contract. */
15
+ onWorkspaceWideChange?: () => void;
14
16
  /** Show as icon only (for small screens) */
15
17
  compact?: boolean;
16
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContextSwitcher.d.ts","sourceRoot":"","sources":["../../src/chrome/ContextSwitcher.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAQ3C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAW,MAAM,yBAAyB,CAAC;AAKzF,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAEhF,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,IAAI,CAAC;IACnD,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACnD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAyPpD,CAAC"}
1
+ {"version":3,"file":"ContextSwitcher.d.ts","sourceRoot":"","sources":["../../src/chrome/ContextSwitcher.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAQ3C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAW,MAAM,yBAAyB,CAAC;AAKzF,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAEhF,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,IAAI,CAAC;IACnD,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACnD,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,mFAAmF;IACnF,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA8QpD,CAAC"}
@@ -10,142 +10,145 @@ import { TriggerButton as u } from "./contextSwitcher/TriggerButton.js";
10
10
  import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
11
11
  import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
12
12
  //#region src/chrome/ContextSwitcher.tsx
13
- var y = ({ organizations: y, workspaces: b, projects: x, currentOrganizationId: S, currentWorkspaceId: C, currentProjectId: w, onOrganizationChange: T, onWorkspaceChange: E, onProjectChange: D, compact: te = !1 }) => {
14
- let O = ee(), [k, A] = h(!1), [j, M] = h(() => S ? "workspace" : "org"), [N, P] = h({
13
+ var y = ({ organizations: y, workspaces: b, projects: x, currentOrganizationId: S, currentWorkspaceId: C, currentProjectId: w, onOrganizationChange: T, onWorkspaceChange: E, onProjectChange: D, onWorkspaceWideChange: O, compact: te = !1 }) => {
14
+ let k = ee(), [A, j] = h(!1), [M, N] = h(() => S ? "workspace" : "org"), [P, F] = h({
15
15
  org: "",
16
16
  workspace: "",
17
17
  project: ""
18
- }), F = a(), I = m(null), L = m(null), R = m(S);
19
- R.current = S;
20
- let z = y.find((e) => e.id === S), B = b.find((e) => e.id === C), V = x.find((e) => e.id === w), H = b.filter((e) => e.organizationId === S), U = x.filter((e) => e.workspaceId === C), W = d((e, t) => {
18
+ }), I = a(), L = m(null), R = m(null), z = m(S);
19
+ z.current = S;
20
+ let B = y.find((e) => e.id === S), V = b.find((e) => e.id === C), H = x.find((e) => e.id === w), U = b.filter((e) => e.organizationId === S), W = x.filter((e) => e.workspaceId === C), G = d((e, t) => {
21
21
  if (!t.trim()) return e;
22
22
  let n = t.toLowerCase().trim();
23
23
  return e.filter((e) => e.name.toLowerCase().includes(n));
24
- }, []), G = m({
25
- filteredWorkspaces: H,
24
+ }, []), K = m({
25
+ filteredWorkspaces: U,
26
26
  currentWorkspaceId: C,
27
27
  onWorkspaceChange: E
28
28
  });
29
- G.current = {
30
- filteredWorkspaces: H,
29
+ K.current = {
30
+ filteredWorkspaces: U,
31
31
  currentWorkspaceId: C,
32
32
  onWorkspaceChange: E
33
- }, i("header.context", p(() => ({ run: () => k ? { status: "already" } : (A(!0), { status: "done" }) }), [k]));
34
- let K = E !== void 0;
35
- i("header.workspace", p(() => K ? {
36
- targets: () => G.current.filteredWorkspaces.map((e) => ({
33
+ }, i("header.context", p(() => ({ run: () => A ? { status: "already" } : (j(!0), { status: "done" }) }), [A]));
34
+ let q = E !== void 0;
35
+ i("header.workspace", p(() => q ? {
36
+ targets: () => K.current.filteredWorkspaces.map((e) => ({
37
37
  id: e.id,
38
38
  label: e.name,
39
- current: e.id === G.current.currentWorkspaceId
39
+ current: e.id === K.current.currentWorkspaceId
40
40
  })),
41
41
  switchTo: (e) => {
42
- let { filteredWorkspaces: t, currentWorkspaceId: n, onWorkspaceChange: r } = G.current, i = t.find((t) => t.id === e);
42
+ let { filteredWorkspaces: t, currentWorkspaceId: n, onWorkspaceChange: r } = K.current, i = t.find((t) => t.id === e);
43
43
  return !i || !r ? { status: "failed" } : i.id === n ? { status: "already" } : (r(i), { status: "done" });
44
44
  }
45
- } : null, [K]));
46
- let q = W(y, N.org), J = W(H, N.workspace), Y = W(U, N.project), X = d((e, t) => {
47
- P((n) => ({
45
+ } : null, [q]));
46
+ let J = () => {
47
+ !C || !O || (O(), j(!1));
48
+ }, Y = G(y, P.org), ne = G(U, P.workspace), re = G(W, P.project), X = d((e, t) => {
49
+ F((n) => ({
48
50
  ...n,
49
51
  [e]: t
50
52
  }));
51
53
  }, []), Z = d((e) => {
52
- M(e), P({
54
+ N(e), F({
53
55
  org: "",
54
56
  workspace: "",
55
57
  project: ""
56
58
  }), setTimeout(() => {
57
- L.current?.focus();
59
+ R.current?.focus();
58
60
  }, 50);
59
61
  }, []);
60
62
  f(() => {
61
- if (F) return;
63
+ if (I) return;
62
64
  let e = (e) => {
63
- I.current && !I.current.contains(e.target) && A(!1);
65
+ L.current && !L.current.contains(e.target) && j(!1);
64
66
  };
65
- if (k) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
66
- }, [k, F]), f(() => {
67
- if (k) {
68
- M(R.current ? "workspace" : "org");
67
+ if (A) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
68
+ }, [A, I]), f(() => {
69
+ if (A) {
70
+ N(z.current ? "workspace" : "org");
69
71
  let e = setTimeout(() => {
70
- L.current?.focus();
72
+ R.current?.focus();
71
73
  }, 100);
72
74
  return () => clearTimeout(e);
73
75
  }
74
- P({
76
+ F({
75
77
  org: "",
76
78
  workspace: "",
77
79
  project: ""
78
80
  });
79
- }, [k]);
80
- let ne = (e) => {
81
+ }, [A]);
82
+ let ie = (e) => {
81
83
  T && T(e);
82
- }, re = (e) => {
84
+ }, ae = (e) => {
83
85
  E && E(e);
84
- }, ie = (e) => {
85
- D && D(e), A(!1);
86
+ }, oe = (e) => {
87
+ D && D(e), j(!1);
86
88
  }, Q = () => /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
87
89
  className: "flex items-stretch border-b border-[var(--color-border-subtle)] bg-[var(--color-bg-surface)]",
88
90
  children: [
89
91
  /* @__PURE__ */ _(o, {
90
- label: O("contextSwitcher.organization", "Organization"),
91
- isActive: j === "org",
92
+ label: k("contextSwitcher.organization", "Organization"),
93
+ isActive: M === "org",
92
94
  onClick: () => Z("org")
93
95
  }),
94
96
  /* @__PURE__ */ _(o, {
95
- label: O("contextSwitcher.workspace", "Workspace"),
96
- isActive: j === "workspace",
97
+ label: k("contextSwitcher.workspace", "Workspace"),
98
+ isActive: M === "workspace",
97
99
  onClick: () => Z("workspace")
98
100
  }),
99
101
  /* @__PURE__ */ _(o, {
100
- label: O("contextSwitcher.project", "Project"),
101
- isActive: j === "project",
102
+ label: k("contextSwitcher.project", "Project"),
103
+ isActive: M === "project",
102
104
  onClick: () => Z("project")
103
105
  })
104
106
  ]
105
107
  }), /* @__PURE__ */ v("div", {
106
108
  className: "flex-1 overflow-hidden",
107
109
  children: [
108
- j === "org" && /* @__PURE__ */ _(s, {
110
+ M === "org" && /* @__PURE__ */ _(s, {
109
111
  organizations: y,
110
- searchedOrganizations: q,
112
+ searchedOrganizations: Y,
111
113
  currentOrganizationId: S,
112
- searchQuery: N.org,
114
+ searchQuery: P.org,
113
115
  onSearchChange: (e) => X("org", e),
114
- onSelect: ne,
115
- searchInputRef: L
116
+ onSelect: ie,
117
+ searchInputRef: R
116
118
  }),
117
- j === "workspace" && /* @__PURE__ */ _(c, {
118
- filteredWorkspaces: H,
119
- searchedWorkspaces: J,
119
+ M === "workspace" && /* @__PURE__ */ _(c, {
120
+ filteredWorkspaces: U,
121
+ searchedWorkspaces: ne,
120
122
  currentWorkspaceId: C,
121
- searchQuery: N.workspace,
123
+ searchQuery: P.workspace,
122
124
  onSearchChange: (e) => X("workspace", e),
123
- onSelect: re,
124
- searchInputRef: L
125
+ onSelect: ae,
126
+ searchInputRef: R
125
127
  }),
126
- j === "project" && /* @__PURE__ */ _(l, {
127
- filteredProjects: U,
128
- searchedProjects: Y,
128
+ M === "project" && /* @__PURE__ */ _(l, {
129
+ onWorkspaceWideSelect: C && O ? J : void 0,
130
+ filteredProjects: W,
131
+ searchedProjects: re,
129
132
  currentProjectId: w,
130
- searchQuery: N.project,
133
+ searchQuery: P.project,
131
134
  onSearchChange: (e) => X("project", e),
132
- onSelect: ie,
133
- searchInputRef: L
135
+ onSelect: oe,
136
+ searchInputRef: R
134
137
  })
135
138
  ]
136
139
  })] }), $ = /* @__PURE__ */ _(u, {
137
- isOpen: k,
140
+ isOpen: A,
138
141
  compact: te,
139
- currentOrg: z,
140
- currentWorkspace: B,
141
- currentProject: V,
142
- onToggle: () => A(!k)
142
+ currentOrg: B,
143
+ currentWorkspace: V,
144
+ currentProject: H,
145
+ onToggle: () => j(!A)
143
146
  });
144
- return F ? /* @__PURE__ */ v("div", {
147
+ return I ? /* @__PURE__ */ v("div", {
145
148
  className: "relative",
146
149
  children: [$, /* @__PURE__ */ _(e, {
147
- open: k,
148
- onOpenChange: A,
150
+ open: A,
151
+ onOpenChange: j,
149
152
  children: /* @__PURE__ */ v(t, {
150
153
  side: "bottom",
151
154
  className: "h-[70vh] flex flex-col p-0",
@@ -153,7 +156,7 @@ var y = ({ organizations: y, workspaces: b, projects: x, currentOrganizationId:
153
156
  className: "px-4 pt-4 pb-2 border-b border-[var(--color-border-subtle)]",
154
157
  children: /* @__PURE__ */ _(r, {
155
158
  className: "text-[var(--color-text-primary)]",
156
- children: O("contextSwitcher.title", "Switch Context")
159
+ children: k("contextSwitcher.title", "Switch Context")
157
160
  })
158
161
  }), /* @__PURE__ */ _("div", {
159
162
  className: "flex-1 flex flex-col overflow-hidden",
@@ -163,8 +166,8 @@ var y = ({ organizations: y, workspaces: b, projects: x, currentOrganizationId:
163
166
  })]
164
167
  }) : /* @__PURE__ */ v("div", {
165
168
  className: "relative",
166
- ref: I,
167
- children: [$, k && /* @__PURE__ */ _("div", {
169
+ ref: L,
170
+ children: [$, A && /* @__PURE__ */ _("div", {
168
171
  className: "absolute right-0 mt-2 w-[calc(100vw-2rem)] sm:w-[26rem] bg-[var(--color-bg-elevated)] border border-[var(--color-border-subtle)] rounded-card shadow-[var(--shadow-elevation-4)] z-50 flex flex-col max-h-[400px] overflow-hidden animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200",
169
172
  children: Q()
170
173
  })]
@@ -7,6 +7,7 @@ export declare const ProjectList: FC<{
7
7
  searchQuery: string;
8
8
  onSearchChange: (value: string) => void;
9
9
  onSelect: (project: Project) => void;
10
+ onWorkspaceWideSelect?: () => void;
10
11
  searchInputRef: RefObject<HTMLInputElement | null>;
11
12
  }>;
12
13
  //# sourceMappingURL=ProjectList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectList.d.ts","sourceRoot":"","sources":["../../../src/chrome/contextSwitcher/ProjectList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC;IAC3B,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAC5B,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,cAAc,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;CACpD,CA2CA,CAAC"}
1
+ {"version":3,"file":"ProjectList.d.ts","sourceRoot":"","sources":["../../../src/chrome/contextSwitcher/ProjectList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC;IAC3B,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAC5B,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,cAAc,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;CACpD,CA0DA,CAAC"}
@@ -3,16 +3,29 @@ import { EmptyState as t } from "./EmptyState.js";
3
3
  import { CheckIcon as n, FolderIcon as r } from "./icons.js";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  //#region src/chrome/contextSwitcher/ProjectList.tsx
6
- var o = ({ filteredProjects: o, searchedProjects: s, currentProjectId: c, searchQuery: l, onSearchChange: u, onSelect: d, searchInputRef: f }) => /* @__PURE__ */ a("div", {
6
+ var o = ({ filteredProjects: o, searchedProjects: s, currentProjectId: c, searchQuery: l, onSearchChange: u, onSelect: d, onWorkspaceWideSelect: f, searchInputRef: p }) => /* @__PURE__ */ a("div", {
7
7
  className: "h-full flex flex-col",
8
8
  children: [/* @__PURE__ */ i(e, {
9
9
  value: l,
10
10
  onChange: u,
11
11
  placeholder: "Search projects...",
12
- inputRef: f
13
- }), /* @__PURE__ */ i("div", {
12
+ inputRef: p
13
+ }), /* @__PURE__ */ a("div", {
14
14
  className: "flex-1 overflow-y-auto py-1",
15
- children: o.length === 0 ? /* @__PURE__ */ i(t, { message: "No projects in this workspace" }) : s.length > 0 ? s.map((e, t) => /* @__PURE__ */ a("button", {
15
+ children: [f && /* @__PURE__ */ a("button", {
16
+ type: "button",
17
+ onClick: f,
18
+ className: "w-full flex items-center gap-3 px-4 py-3 text-sm text-text-primary hover:bg-bg-sunken",
19
+ "aria-pressed": !c,
20
+ children: [
21
+ /* @__PURE__ */ i(r, { className: "size-5 text-[var(--color-text-secondary)] flex-shrink-0" }),
22
+ /* @__PURE__ */ i("span", {
23
+ className: "flex-1 text-left",
24
+ children: "All projects (workspace-wide)"
25
+ }),
26
+ !c && /* @__PURE__ */ i(n, { className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0" })
27
+ ]
28
+ }), o.length === 0 ? /* @__PURE__ */ i(t, { message: "No projects in this workspace" }) : s.length > 0 ? s.map((e, t) => /* @__PURE__ */ a("button", {
16
29
  onClick: () => d(e),
17
30
  className: `w-full flex items-center gap-3 px-4 py-3 text-sm transition-all duration-200 ease-[var(--motion-easing-out)] animate-in fade-in-0 slide-in-from-left-2 ${e.id === c ? "bg-[var(--color-accent-soft)] text-text-primary font-medium" : "text-text-primary hover:bg-bg-sunken hover:translate-x-0.5"}`,
18
31
  style: { animationDelay: `${t * 30}ms` },
@@ -27,7 +40,7 @@ var o = ({ filteredProjects: o, searchedProjects: s, currentProjectId: c, search
27
40
  }, e.id)) : /* @__PURE__ */ i(t, {
28
41
  message: "No projects found",
29
42
  isSearchResult: l.length > 0
30
- })
43
+ })]
31
44
  })]
32
45
  });
33
46
  //#endregion
@@ -116,7 +116,7 @@ for (var p = 144; p < 256; ++p) g[p] = 9;
116
116
  for (var p = 256; p < 280; ++p) g[p] = 7;
117
117
  for (var p = 280; p < 288; ++p) g[p] = 8;
118
118
  for (var _ = new e(32), p = 0; p < 32; ++p) _[p] = 5;
119
- var v = /* @__PURE__ */ h(g, 9, 1), ee = /* @__PURE__ */ h(_, 5, 1), y = function(e) {
119
+ var v = /*#__PURE__*/ h(g, 9, 1), ee = /*#__PURE__*/ h(_, 5, 1), y = function(e) {
120
120
  for (var t = e[0], n = 1; n < e.length; ++n) e[n] > t && (t = e[n]);
121
121
  return t;
122
122
  }, b = function(e, t, n) {
@@ -236,7 +236,7 @@ var v = /* @__PURE__ */ h(g, 9, 1), ee = /* @__PURE__ */ h(_, 5, 1), y = functio
236
236
  n.l = E, n.p = q, n.b = T, n.f = _, E && (_ = 1, n.m = O, n.d = D, n.n = k);
237
237
  } while (!_);
238
238
  return T != o.length && f ? S(o, 0, T) : o.subarray(0, T);
239
- }, E = /* @__PURE__ */ new e(0), D = function(e, t) {
239
+ }, E = /*#__PURE__*/ new e(0), D = function(e, t) {
240
240
  return e[t] | e[t + 1] << 8;
241
241
  }, O = function(e, t) {
242
242
  return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0;
@@ -246,7 +246,7 @@ var v = /* @__PURE__ */ h(g, 9, 1), ee = /* @__PURE__ */ h(_, 5, 1), y = functio
246
246
  function A(e, t) {
247
247
  return T(e, { i: 2 }, t && t.out, t && t.dictionary);
248
248
  }
249
- var j = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder();
249
+ var j = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
250
250
  try {
251
251
  j.decode(E, { stream: !0 });
252
252
  } catch {}
@@ -17,17 +17,17 @@ var f = /* @__PURE__ */ e(l(), 1), p = {}.hasOwnProperty, m = /* @__PURE__ */ ne
17
17
  "thead",
18
18
  "tfoot",
19
19
  "tr"
20
- ]), _ = new Set(["td", "th"]), v = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
21
- function y(e, t) {
20
+ ]), _ = new Set(["td", "th"]);
21
+ function v(e, t) {
22
22
  if (!t || t.Fragment === void 0) throw TypeError("Expected `Fragment` in options");
23
23
  let n = t.filePath || void 0, r;
24
24
  if (t.development) {
25
25
  if (typeof t.jsxDEV != "function") throw TypeError("Expected `jsxDEV` in options when `development: true`");
26
- r = A(n, t.jsxDEV);
26
+ r = k(n, t.jsxDEV);
27
27
  } else {
28
28
  if (typeof t.jsx != "function") throw TypeError("Expected `jsx` in production options");
29
29
  if (typeof t.jsxs != "function") throw TypeError("Expected `jsxs` in production options");
30
- r = k(n, t.jsx, t.jsxs);
30
+ r = O(n, t.jsx, t.jsxs);
31
31
  }
32
32
  let i = {
33
33
  Fragment: t.Fragment,
@@ -43,66 +43,66 @@ function y(e, t) {
43
43
  schema: t.space === "svg" ? s : o,
44
44
  stylePropertyNameCase: t.stylePropertyNameCase || "dom",
45
45
  tableCellAlignToStyle: t.tableCellAlignToStyle !== !1
46
- }, a = b(i, e, void 0);
46
+ }, a = y(i, e, void 0);
47
47
  return a && typeof a != "string" ? a : i.create(e, i.Fragment, { children: a || void 0 }, void 0);
48
48
  }
49
+ function y(e, t, n) {
50
+ if (t.type === "element") return b(e, t, n);
51
+ if (t.type === "mdxFlowExpression" || t.type === "mdxTextExpression") return x(e, t);
52
+ if (t.type === "mdxJsxFlowElement" || t.type === "mdxJsxTextElement") return C(e, t, n);
53
+ if (t.type === "mdxjsEsm") return S(e, t);
54
+ if (t.type === "root") return w(e, t, n);
55
+ if (t.type === "text") return T(e, t);
56
+ }
49
57
  function b(e, t, n) {
50
- if (t.type === "element") return x(e, t, n);
51
- if (t.type === "mdxFlowExpression" || t.type === "mdxTextExpression") return S(e, t);
52
- if (t.type === "mdxJsxFlowElement" || t.type === "mdxJsxTextElement") return w(e, t, n);
53
- if (t.type === "mdxjsEsm") return C(e, t);
54
- if (t.type === "root") return T(e, t, n);
55
- if (t.type === "text") return E(e, t);
56
- }
57
- function x(e, t, n) {
58
58
  let i = e.schema, a = i;
59
59
  t.tagName.toLowerCase() === "svg" && i.space === "html" && (a = s, e.schema = a), e.ancestors.push(t);
60
- let o = I(e, t.tagName, !1), c = j(e, t), l = N(e, t);
60
+ let o = F(e, t.tagName, !1), c = A(e, t), l = M(e, t);
61
61
  return g.has(t.tagName) && (l = l.filter(function(e) {
62
62
  return typeof e == "string" ? !r(e) : !0;
63
- })), D(e, c, o, t), O(c, l), e.ancestors.pop(), e.schema = i, e.create(t, o, c, n);
63
+ })), E(e, c, o, t), D(c, l), e.ancestors.pop(), e.schema = i, e.create(t, o, c, n);
64
64
  }
65
- function S(e, t) {
65
+ function x(e, t) {
66
66
  if (t.data && t.data.estree && e.evaluater) {
67
67
  let n = t.data.estree.body[0];
68
68
  return n.type, e.evaluater.evaluateExpression(n.expression);
69
69
  }
70
- L(e, t.position);
70
+ I(e, t.position);
71
71
  }
72
- function C(e, t) {
72
+ function S(e, t) {
73
73
  if (t.data && t.data.estree && e.evaluater) return e.evaluater.evaluateProgram(t.data.estree);
74
- L(e, t.position);
74
+ I(e, t.position);
75
75
  }
76
- function w(e, t, n) {
76
+ function C(e, t, n) {
77
77
  let r = e.schema, i = r;
78
78
  t.name === "svg" && r.space === "html" && (i = s, e.schema = i), e.ancestors.push(t);
79
- let a = t.name === null ? e.Fragment : I(e, t.name, !0), o = M(e, t), c = N(e, t);
80
- return D(e, o, a, t), O(o, c), e.ancestors.pop(), e.schema = r, e.create(t, a, o, n);
79
+ let a = t.name === null ? e.Fragment : F(e, t.name, !0), o = j(e, t), c = M(e, t);
80
+ return E(e, o, a, t), D(o, c), e.ancestors.pop(), e.schema = r, e.create(t, a, o, n);
81
81
  }
82
- function T(e, t, n) {
82
+ function w(e, t, n) {
83
83
  let r = {};
84
- return O(r, N(e, t)), e.create(t, e.Fragment, r, n);
84
+ return D(r, M(e, t)), e.create(t, e.Fragment, r, n);
85
85
  }
86
- function E(e, t) {
86
+ function T(e, t) {
87
87
  return t.value;
88
88
  }
89
- function D(e, t, n, r) {
89
+ function E(e, t, n, r) {
90
90
  typeof n != "string" && n !== e.Fragment && e.passNode && (t.node = r);
91
91
  }
92
- function O(e, t) {
92
+ function D(e, t) {
93
93
  if (t.length > 0) {
94
94
  let n = t.length > 1 ? t : t[0];
95
95
  n && (e.children = n);
96
96
  }
97
97
  }
98
- function k(e, t, n) {
98
+ function O(e, t, n) {
99
99
  return r;
100
100
  function r(e, r, i, a) {
101
101
  let o = Array.isArray(i.children) ? n : t;
102
102
  return a ? o(r, i, a) : o(r, i);
103
103
  }
104
104
  }
105
- function A(e, t) {
105
+ function k(e, t) {
106
106
  return n;
107
107
  function n(n, r, i, a) {
108
108
  let o = Array.isArray(i.children), s = u(n);
@@ -113,10 +113,10 @@ function A(e, t) {
113
113
  }, void 0);
114
114
  }
115
115
  }
116
- function j(e, t) {
116
+ function A(e, t) {
117
117
  let n = {}, r, i;
118
118
  for (i in t.properties) if (i !== "children" && p.call(t.properties, i)) {
119
- let a = P(e, i, t.properties[i]);
119
+ let a = N(e, i, t.properties[i]);
120
120
  if (a) {
121
121
  let [i, o] = a;
122
122
  e.tableCellAlignToStyle && i === "align" && typeof o == "string" && _.has(t.tagName) ? r = o : n[i] = o;
@@ -128,7 +128,7 @@ function j(e, t) {
128
128
  }
129
129
  return n;
130
130
  }
131
- function M(e, t) {
131
+ function j(e, t) {
132
132
  let n = {};
133
133
  for (let r of t.attributes) if (r.type === "mdxJsxExpressionAttribute") if (r.data && r.data.estree && e.evaluater) {
134
134
  let t = r.data.estree.body[0];
@@ -137,19 +137,19 @@ function M(e, t) {
137
137
  i.type;
138
138
  let a = i.properties[0];
139
139
  a.type, Object.assign(n, e.evaluater.evaluateExpression(a.argument));
140
- } else L(e, t.position);
140
+ } else I(e, t.position);
141
141
  else {
142
142
  let i = r.name, a;
143
143
  if (r.value && typeof r.value == "object") if (r.value.data && r.value.data.estree && e.evaluater) {
144
144
  let t = r.value.data.estree.body[0];
145
145
  t.type, a = e.evaluater.evaluateExpression(t.expression);
146
- } else L(e, t.position);
146
+ } else I(e, t.position);
147
147
  else a = r.value === null ? !0 : r.value;
148
148
  n[i] = a;
149
149
  }
150
150
  return n;
151
151
  }
152
- function N(e, t) {
152
+ function M(e, t) {
153
153
  let n = [], r = -1, i = e.passKeys ? /* @__PURE__ */ new Map() : m;
154
154
  for (; ++r < t.children.length;) {
155
155
  let a = t.children[r], o;
@@ -160,22 +160,22 @@ function N(e, t) {
160
160
  o = e + "-" + t, i.set(e, t + 1);
161
161
  }
162
162
  }
163
- let s = b(e, a, o);
163
+ let s = y(e, a, o);
164
164
  s !== void 0 && n.push(s);
165
165
  }
166
166
  return n;
167
167
  }
168
- function P(e, n, r) {
168
+ function N(e, n, r) {
169
169
  let o = a(e.schema, n);
170
170
  if (!(r == null || typeof r == "number" && Number.isNaN(r))) {
171
171
  if (Array.isArray(r) && (r = o.commaSeparated ? t(r) : c(r)), o.property === "style") {
172
- let t = typeof r == "object" ? r : F(e, String(r));
173
- return e.stylePropertyNameCase === "css" && (t = R(t)), ["style", t];
172
+ let t = typeof r == "object" ? r : P(e, String(r));
173
+ return e.stylePropertyNameCase === "css" && (t = L(t)), ["style", t];
174
174
  }
175
175
  return [e.elementAttributeNameCase === "react" && o.space ? i[o.property] || o.property : o.attribute, r];
176
176
  }
177
177
  }
178
- function F(e, t) {
178
+ function P(e, t) {
179
179
  try {
180
180
  return (0, f.default)(t, { reactCompat: !0 });
181
181
  } catch (t) {
@@ -186,10 +186,10 @@ function F(e, t) {
186
186
  ruleId: "style",
187
187
  source: "hast-util-to-jsx-runtime"
188
188
  });
189
- throw r.file = e.filePath || void 0, r.url = v + "#cannot-parse-style-attribute", r;
189
+ throw r.file = e.filePath || void 0, r.url = "https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute", r;
190
190
  }
191
191
  }
192
- function I(e, t, r) {
192
+ function F(e, t, r) {
193
193
  let i;
194
194
  if (!r) i = {
195
195
  type: "Literal",
@@ -226,28 +226,28 @@ function I(e, t, r) {
226
226
  return p.call(e.components, t) ? e.components[t] : t;
227
227
  }
228
228
  if (e.evaluater) return e.evaluater.evaluateExpression(i);
229
- L(e);
229
+ I(e);
230
230
  }
231
- function L(e, t) {
231
+ function I(e, t) {
232
232
  let n = new d("Cannot handle MDX estrees without `createEvaluater`", {
233
233
  ancestors: e.ancestors,
234
234
  place: t,
235
235
  ruleId: "mdx-estree",
236
236
  source: "hast-util-to-jsx-runtime"
237
237
  });
238
- throw n.file = e.filePath || void 0, n.url = v + "#cannot-handle-mdx-estrees-without-createevaluater", n;
238
+ throw n.file = e.filePath || void 0, n.url = "https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater", n;
239
239
  }
240
- function R(e) {
240
+ function L(e) {
241
241
  let t = {}, n;
242
- for (n in e) p.call(e, n) && (t[z(n)] = e[n]);
242
+ for (n in e) p.call(e, n) && (t[R(n)] = e[n]);
243
243
  return t;
244
244
  }
245
- function z(e) {
246
- let t = e.replace(h, B);
245
+ function R(e) {
246
+ let t = e.replace(h, z);
247
247
  return t.slice(0, 3) === "ms-" && (t = "-" + t), t;
248
248
  }
249
- function B(e) {
249
+ function z(e) {
250
250
  return "-" + e.toLowerCase();
251
251
  }
252
252
  //#endregion
253
- export { y as toJsxRuntime };
253
+ export { v as toJsxRuntime };