@xenide-io/the-old-ui-theme 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-message-blocknote-4Q4U2T2W.mjs +63 -0
- package/dist/chunk-IAH7Z46I.mjs +104 -0
- package/dist/suite.js +327 -238
- package/dist/suite.mjs +110 -190
- package/package.json +3 -1
- package/src/styles/suite-skin.css +22 -0
- package/src/suite/components/ai-message-blocknote.test.tsx +40 -0
- package/src/suite/components/ai-message-blocknote.tsx +61 -0
- package/src/suite/components/ai-panel.tsx +19 -1
package/dist/suite.js
CHANGED
|
@@ -34,6 +34,9 @@ var __objRest = (source, exclude) => {
|
|
|
34
34
|
}
|
|
35
35
|
return target;
|
|
36
36
|
};
|
|
37
|
+
var __esm = (fn, res) => function __init() {
|
|
38
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
39
|
+
};
|
|
37
40
|
var __export = (target, all) => {
|
|
38
41
|
for (var name in all)
|
|
39
42
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -56,6 +59,168 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
56
59
|
));
|
|
57
60
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
61
|
|
|
62
|
+
// src/suite/components/theme-provider.tsx
|
|
63
|
+
function systemTheme(fallback) {
|
|
64
|
+
if (typeof window === "undefined") return fallback;
|
|
65
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
66
|
+
}
|
|
67
|
+
function resolveTheme(theme, fallback) {
|
|
68
|
+
return theme === "system" ? systemTheme(fallback) : theme;
|
|
69
|
+
}
|
|
70
|
+
function applyTheme(theme, config) {
|
|
71
|
+
const resolved = resolveTheme(theme, config.fallbackTheme);
|
|
72
|
+
if (typeof document === "undefined") return resolved;
|
|
73
|
+
document.documentElement.setAttribute(
|
|
74
|
+
"data-theme",
|
|
75
|
+
resolved === "dark" ? config.darkThemeId : config.lightThemeId
|
|
76
|
+
);
|
|
77
|
+
document.documentElement.classList.toggle("dark", resolved === "dark");
|
|
78
|
+
if (config.themeColorLight && config.themeColorDark) {
|
|
79
|
+
const meta = document.getElementById(
|
|
80
|
+
"theme-color-meta"
|
|
81
|
+
);
|
|
82
|
+
if (meta) {
|
|
83
|
+
meta.content = resolved === "light" ? config.themeColorLight : config.themeColorDark;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return resolved;
|
|
87
|
+
}
|
|
88
|
+
function readStoredTheme(storageKey) {
|
|
89
|
+
if (typeof window === "undefined") return "system";
|
|
90
|
+
const stored = localStorage.getItem(storageKey);
|
|
91
|
+
if (stored === "light" || stored === "dark" || stored === "system")
|
|
92
|
+
return stored;
|
|
93
|
+
return "system";
|
|
94
|
+
}
|
|
95
|
+
function SuiteThemeProvider({
|
|
96
|
+
config,
|
|
97
|
+
children
|
|
98
|
+
}) {
|
|
99
|
+
const [state, setState] = (0, import_react7.useState)(() => {
|
|
100
|
+
const theme2 = readStoredTheme(config.storageKey);
|
|
101
|
+
if (typeof document === "undefined") {
|
|
102
|
+
return { theme: theme2, resolvedTheme: config.fallbackTheme };
|
|
103
|
+
}
|
|
104
|
+
const domTheme = document.documentElement.getAttribute("data-theme");
|
|
105
|
+
const resolvedTheme2 = domTheme === config.darkThemeId ? "dark" : domTheme === config.lightThemeId ? "light" : resolveTheme(theme2, config.fallbackTheme);
|
|
106
|
+
return { theme: theme2, resolvedTheme: resolvedTheme2 };
|
|
107
|
+
});
|
|
108
|
+
const { theme, resolvedTheme } = state;
|
|
109
|
+
(0, import_react7.useEffect)(() => {
|
|
110
|
+
if (theme !== "system") return;
|
|
111
|
+
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
112
|
+
const update = () => {
|
|
113
|
+
const resolved = applyTheme("system", config);
|
|
114
|
+
setState((current) => __spreadProps(__spreadValues({}, current), { resolvedTheme: resolved }));
|
|
115
|
+
};
|
|
116
|
+
media.addEventListener("change", update);
|
|
117
|
+
return () => media.removeEventListener("change", update);
|
|
118
|
+
}, [theme, config]);
|
|
119
|
+
const setTheme = (0, import_react7.useCallback)(
|
|
120
|
+
(next) => {
|
|
121
|
+
const resolved = applyTheme(next, config);
|
|
122
|
+
setState({ theme: next, resolvedTheme: resolved });
|
|
123
|
+
localStorage.setItem(config.storageKey, next);
|
|
124
|
+
},
|
|
125
|
+
[config]
|
|
126
|
+
);
|
|
127
|
+
const toggleTheme = (0, import_react7.useCallback)(() => {
|
|
128
|
+
setState((prev) => {
|
|
129
|
+
const next = resolveTheme(prev.theme, config.fallbackTheme) === "dark" ? "light" : "dark";
|
|
130
|
+
const resolved = applyTheme(next, config);
|
|
131
|
+
localStorage.setItem(config.storageKey, next);
|
|
132
|
+
return { theme: next, resolvedTheme: resolved };
|
|
133
|
+
});
|
|
134
|
+
}, [config]);
|
|
135
|
+
const value = (0, import_react7.useMemo)(
|
|
136
|
+
() => ({ theme, resolvedTheme, setTheme, toggleTheme }),
|
|
137
|
+
[theme, resolvedTheme, setTheme, toggleTheme]
|
|
138
|
+
);
|
|
139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SuiteThemeContext.Provider, { value, children });
|
|
140
|
+
}
|
|
141
|
+
function useSuiteTheme() {
|
|
142
|
+
const ctx = (0, import_react7.useContext)(SuiteThemeContext);
|
|
143
|
+
if (!ctx) throw new Error("useTheme must be used within ThemeProvider");
|
|
144
|
+
return ctx;
|
|
145
|
+
}
|
|
146
|
+
var import_react7, import_jsx_runtime18, SuiteThemeContext;
|
|
147
|
+
var init_theme_provider = __esm({
|
|
148
|
+
"src/suite/components/theme-provider.tsx"() {
|
|
149
|
+
"use strict";
|
|
150
|
+
"use client";
|
|
151
|
+
import_react7 = require("react");
|
|
152
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
153
|
+
SuiteThemeContext = (0, import_react7.createContext)(null);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// src/suite/components/ai-message-blocknote.tsx
|
|
158
|
+
var ai_message_blocknote_exports = {};
|
|
159
|
+
__export(ai_message_blocknote_exports, {
|
|
160
|
+
default: () => SuiteAiBlockNoteMessage
|
|
161
|
+
});
|
|
162
|
+
function SuiteAiBlockNoteMessage({
|
|
163
|
+
markdown
|
|
164
|
+
}) {
|
|
165
|
+
const { resolvedTheme } = useSuiteTheme();
|
|
166
|
+
const editor = (0, import_react9.useCreateBlockNote)({ schema: assistantSchema });
|
|
167
|
+
(0, import_react8.useEffect)(() => {
|
|
168
|
+
try {
|
|
169
|
+
const blocks = editor.tryParseMarkdownToBlocks(markdown);
|
|
170
|
+
editor.replaceBlocks(
|
|
171
|
+
editor.document,
|
|
172
|
+
blocks.length > 0 ? blocks : [{ type: "paragraph", content: markdown }]
|
|
173
|
+
);
|
|
174
|
+
} catch (e) {
|
|
175
|
+
editor.replaceBlocks(editor.document, [
|
|
176
|
+
{ type: "paragraph", content: markdown }
|
|
177
|
+
]);
|
|
178
|
+
}
|
|
179
|
+
}, [editor, markdown]);
|
|
180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
181
|
+
import_react9.BlockNoteViewRaw,
|
|
182
|
+
{
|
|
183
|
+
editor,
|
|
184
|
+
editable: false,
|
|
185
|
+
theme: resolvedTheme,
|
|
186
|
+
className: "suite-ai-blocknote",
|
|
187
|
+
formattingToolbar: false,
|
|
188
|
+
sideMenu: false,
|
|
189
|
+
slashMenu: false,
|
|
190
|
+
linkToolbar: false,
|
|
191
|
+
filePanel: false,
|
|
192
|
+
tableHandles: false,
|
|
193
|
+
comments: false
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
var import_react8, import_core, import_react9, import_style, import_jsx_runtime19, assistantSchema;
|
|
198
|
+
var init_ai_message_blocknote = __esm({
|
|
199
|
+
"src/suite/components/ai-message-blocknote.tsx"() {
|
|
200
|
+
"use strict";
|
|
201
|
+
"use client";
|
|
202
|
+
import_react8 = require("react");
|
|
203
|
+
import_core = require("@blocknote/core");
|
|
204
|
+
import_react9 = require("@blocknote/react");
|
|
205
|
+
import_style = require("@blocknote/react/style.css");
|
|
206
|
+
init_theme_provider();
|
|
207
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
208
|
+
assistantSchema = import_core.BlockNoteSchema.create({
|
|
209
|
+
blockSpecs: {
|
|
210
|
+
paragraph: import_core.defaultBlockSpecs.paragraph,
|
|
211
|
+
heading: import_core.defaultBlockSpecs.heading,
|
|
212
|
+
bulletListItem: import_core.defaultBlockSpecs.bulletListItem,
|
|
213
|
+
numberedListItem: import_core.defaultBlockSpecs.numberedListItem,
|
|
214
|
+
checkListItem: import_core.defaultBlockSpecs.checkListItem,
|
|
215
|
+
codeBlock: import_core.defaultBlockSpecs.codeBlock,
|
|
216
|
+
quote: import_core.defaultBlockSpecs.quote,
|
|
217
|
+
table: import_core.defaultBlockSpecs.table,
|
|
218
|
+
divider: import_core.defaultBlockSpecs.divider
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
|
|
59
224
|
// src/suite/index.ts
|
|
60
225
|
var suite_exports = {};
|
|
61
226
|
__export(suite_exports, {
|
|
@@ -122,7 +287,7 @@ __export(suite_exports, {
|
|
|
122
287
|
appSwitcherTriggerClass: () => appSwitcherTriggerClass,
|
|
123
288
|
cn: () => cn,
|
|
124
289
|
getTodayGreeting: () => getTodayGreeting,
|
|
125
|
-
m: () =>
|
|
290
|
+
m: () => import_react12.m,
|
|
126
291
|
openSuiteAskAi: () => openSuiteAskAi,
|
|
127
292
|
resolveSuiteNotificationHref: () => resolveSuiteNotificationHref,
|
|
128
293
|
sourceToSuiteApp: () => sourceToSuiteApp,
|
|
@@ -2217,98 +2382,16 @@ function TodayCalibrating({
|
|
|
2217
2382
|
);
|
|
2218
2383
|
}
|
|
2219
2384
|
|
|
2220
|
-
// src/suite/
|
|
2221
|
-
|
|
2222
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2223
|
-
var SuiteThemeContext = (0, import_react7.createContext)(null);
|
|
2224
|
-
function systemTheme(fallback) {
|
|
2225
|
-
if (typeof window === "undefined") return fallback;
|
|
2226
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2227
|
-
}
|
|
2228
|
-
function resolveTheme(theme, fallback) {
|
|
2229
|
-
return theme === "system" ? systemTheme(fallback) : theme;
|
|
2230
|
-
}
|
|
2231
|
-
function applyTheme(theme, config) {
|
|
2232
|
-
const resolved = resolveTheme(theme, config.fallbackTheme);
|
|
2233
|
-
if (typeof document === "undefined") return resolved;
|
|
2234
|
-
document.documentElement.setAttribute(
|
|
2235
|
-
"data-theme",
|
|
2236
|
-
resolved === "dark" ? config.darkThemeId : config.lightThemeId
|
|
2237
|
-
);
|
|
2238
|
-
document.documentElement.classList.toggle("dark", resolved === "dark");
|
|
2239
|
-
if (config.themeColorLight && config.themeColorDark) {
|
|
2240
|
-
const meta = document.getElementById(
|
|
2241
|
-
"theme-color-meta"
|
|
2242
|
-
);
|
|
2243
|
-
if (meta) {
|
|
2244
|
-
meta.content = resolved === "light" ? config.themeColorLight : config.themeColorDark;
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
return resolved;
|
|
2248
|
-
}
|
|
2249
|
-
function readStoredTheme(storageKey) {
|
|
2250
|
-
if (typeof window === "undefined") return "system";
|
|
2251
|
-
const stored = localStorage.getItem(storageKey);
|
|
2252
|
-
if (stored === "light" || stored === "dark" || stored === "system")
|
|
2253
|
-
return stored;
|
|
2254
|
-
return "system";
|
|
2255
|
-
}
|
|
2256
|
-
function SuiteThemeProvider({
|
|
2257
|
-
config,
|
|
2258
|
-
children
|
|
2259
|
-
}) {
|
|
2260
|
-
const [state, setState] = (0, import_react7.useState)(() => {
|
|
2261
|
-
const theme2 = readStoredTheme(config.storageKey);
|
|
2262
|
-
if (typeof document === "undefined") {
|
|
2263
|
-
return { theme: theme2, resolvedTheme: config.fallbackTheme };
|
|
2264
|
-
}
|
|
2265
|
-
const domTheme = document.documentElement.getAttribute("data-theme");
|
|
2266
|
-
const resolvedTheme2 = domTheme === config.darkThemeId ? "dark" : domTheme === config.lightThemeId ? "light" : resolveTheme(theme2, config.fallbackTheme);
|
|
2267
|
-
return { theme: theme2, resolvedTheme: resolvedTheme2 };
|
|
2268
|
-
});
|
|
2269
|
-
const { theme, resolvedTheme } = state;
|
|
2270
|
-
(0, import_react7.useEffect)(() => {
|
|
2271
|
-
if (theme !== "system") return;
|
|
2272
|
-
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2273
|
-
const update = () => {
|
|
2274
|
-
const resolved = applyTheme("system", config);
|
|
2275
|
-
setState((current) => __spreadProps(__spreadValues({}, current), { resolvedTheme: resolved }));
|
|
2276
|
-
};
|
|
2277
|
-
media.addEventListener("change", update);
|
|
2278
|
-
return () => media.removeEventListener("change", update);
|
|
2279
|
-
}, [theme, config]);
|
|
2280
|
-
const setTheme = (0, import_react7.useCallback)(
|
|
2281
|
-
(next) => {
|
|
2282
|
-
const resolved = applyTheme(next, config);
|
|
2283
|
-
setState({ theme: next, resolvedTheme: resolved });
|
|
2284
|
-
localStorage.setItem(config.storageKey, next);
|
|
2285
|
-
},
|
|
2286
|
-
[config]
|
|
2287
|
-
);
|
|
2288
|
-
const toggleTheme = (0, import_react7.useCallback)(() => {
|
|
2289
|
-
setState((prev) => {
|
|
2290
|
-
const next = resolveTheme(prev.theme, config.fallbackTheme) === "dark" ? "light" : "dark";
|
|
2291
|
-
const resolved = applyTheme(next, config);
|
|
2292
|
-
localStorage.setItem(config.storageKey, next);
|
|
2293
|
-
return { theme: next, resolvedTheme: resolved };
|
|
2294
|
-
});
|
|
2295
|
-
}, [config]);
|
|
2296
|
-
const value = (0, import_react7.useMemo)(
|
|
2297
|
-
() => ({ theme, resolvedTheme, setTheme, toggleTheme }),
|
|
2298
|
-
[theme, resolvedTheme, setTheme, toggleTheme]
|
|
2299
|
-
);
|
|
2300
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SuiteThemeContext.Provider, { value, children });
|
|
2301
|
-
}
|
|
2302
|
-
function useSuiteTheme() {
|
|
2303
|
-
const ctx = (0, import_react7.useContext)(SuiteThemeContext);
|
|
2304
|
-
if (!ctx) throw new Error("useTheme must be used within ThemeProvider");
|
|
2305
|
-
return ctx;
|
|
2306
|
-
}
|
|
2385
|
+
// src/suite/index.ts
|
|
2386
|
+
init_theme_provider();
|
|
2307
2387
|
|
|
2308
2388
|
// src/suite/components/ai-panel.tsx
|
|
2309
|
-
var
|
|
2389
|
+
var import_react10 = require("react");
|
|
2310
2390
|
var import_iconoir_react8 = require("iconoir-react");
|
|
2311
|
-
var
|
|
2391
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2392
|
+
var SuiteAiBlockNoteMessage2 = (0, import_react10.lazy)(
|
|
2393
|
+
() => Promise.resolve().then(() => (init_ai_message_blocknote(), ai_message_blocknote_exports))
|
|
2394
|
+
);
|
|
2312
2395
|
var SUITE_OPEN_ASK_AI_EVENT = "shellstack:open-ask-ai";
|
|
2313
2396
|
function openSuiteAskAi(detail) {
|
|
2314
2397
|
if (typeof window === "undefined") return;
|
|
@@ -2345,24 +2428,24 @@ function SuiteAiPanel({
|
|
|
2345
2428
|
spinner: Spinner,
|
|
2346
2429
|
hideLauncher = false
|
|
2347
2430
|
}) {
|
|
2348
|
-
const [open, setOpen] = (0,
|
|
2349
|
-
const [prompt, setPrompt] = (0,
|
|
2350
|
-
const [messages, setMessages] = (0,
|
|
2351
|
-
const [loading, setLoading] = (0,
|
|
2352
|
-
const [hydrating, setHydrating] = (0,
|
|
2353
|
-
const [error, setError] = (0,
|
|
2354
|
-
const [copiedId, setCopiedId] = (0,
|
|
2355
|
-
const [launcherSide, setLauncherSide] = (0,
|
|
2356
|
-
const [launcherPosition, setLauncherPosition] = (0,
|
|
2357
|
-
const [draggingLauncher, setDraggingLauncher] = (0,
|
|
2358
|
-
const scrollerRef = (0,
|
|
2359
|
-
const launcherRef = (0,
|
|
2360
|
-
const launcherSideRef = (0,
|
|
2361
|
-
const launcherPositionRef = (0,
|
|
2362
|
-
const launcherDragRef = (0,
|
|
2363
|
-
const suppressLauncherClickRef = (0,
|
|
2364
|
-
const pendingPromptRef = (0,
|
|
2365
|
-
(0,
|
|
2431
|
+
const [open, setOpen] = (0, import_react10.useState)(false);
|
|
2432
|
+
const [prompt, setPrompt] = (0, import_react10.useState)("");
|
|
2433
|
+
const [messages, setMessages] = (0, import_react10.useState)([]);
|
|
2434
|
+
const [loading, setLoading] = (0, import_react10.useState)(false);
|
|
2435
|
+
const [hydrating, setHydrating] = (0, import_react10.useState)(false);
|
|
2436
|
+
const [error, setError] = (0, import_react10.useState)("");
|
|
2437
|
+
const [copiedId, setCopiedId] = (0, import_react10.useState)(null);
|
|
2438
|
+
const [launcherSide, setLauncherSide] = (0, import_react10.useState)("right");
|
|
2439
|
+
const [launcherPosition, setLauncherPosition] = (0, import_react10.useState)(null);
|
|
2440
|
+
const [draggingLauncher, setDraggingLauncher] = (0, import_react10.useState)(false);
|
|
2441
|
+
const scrollerRef = (0, import_react10.useRef)(null);
|
|
2442
|
+
const launcherRef = (0, import_react10.useRef)(null);
|
|
2443
|
+
const launcherSideRef = (0, import_react10.useRef)("right");
|
|
2444
|
+
const launcherPositionRef = (0, import_react10.useRef)(null);
|
|
2445
|
+
const launcherDragRef = (0, import_react10.useRef)(null);
|
|
2446
|
+
const suppressLauncherClickRef = (0, import_react10.useRef)(false);
|
|
2447
|
+
const pendingPromptRef = (0, import_react10.useRef)(null);
|
|
2448
|
+
(0, import_react10.useEffect)(() => {
|
|
2366
2449
|
const launcher = launcherRef.current;
|
|
2367
2450
|
if (!launcher) return;
|
|
2368
2451
|
let side = "right";
|
|
@@ -2397,12 +2480,12 @@ function SuiteAiPanel({
|
|
|
2397
2480
|
window.addEventListener("resize", placeLauncher);
|
|
2398
2481
|
return () => window.removeEventListener("resize", placeLauncher);
|
|
2399
2482
|
}, []);
|
|
2400
|
-
const scrollToBottom = (0,
|
|
2483
|
+
const scrollToBottom = (0, import_react10.useCallback)(() => {
|
|
2401
2484
|
const el = scrollerRef.current;
|
|
2402
2485
|
if (!el) return;
|
|
2403
2486
|
el.scrollTop = el.scrollHeight;
|
|
2404
2487
|
}, []);
|
|
2405
|
-
const hydrate = (0,
|
|
2488
|
+
const hydrate = (0, import_react10.useCallback)(async () => {
|
|
2406
2489
|
var _a;
|
|
2407
2490
|
setHydrating(true);
|
|
2408
2491
|
setError("");
|
|
@@ -2420,7 +2503,7 @@ function SuiteAiPanel({
|
|
|
2420
2503
|
setHydrating(false);
|
|
2421
2504
|
}
|
|
2422
2505
|
}, [fetchChat]);
|
|
2423
|
-
(0,
|
|
2506
|
+
(0, import_react10.useEffect)(() => {
|
|
2424
2507
|
function onOpen(event) {
|
|
2425
2508
|
var _a;
|
|
2426
2509
|
const detail = event.detail;
|
|
@@ -2433,7 +2516,7 @@ function SuiteAiPanel({
|
|
|
2433
2516
|
window.addEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
2434
2517
|
return () => window.removeEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
2435
2518
|
}, []);
|
|
2436
|
-
(0,
|
|
2519
|
+
(0, import_react10.useEffect)(() => {
|
|
2437
2520
|
if (!open) return;
|
|
2438
2521
|
void hydrate().then(() => {
|
|
2439
2522
|
const pending = pendingPromptRef.current;
|
|
@@ -2443,7 +2526,7 @@ function SuiteAiPanel({
|
|
|
2443
2526
|
}
|
|
2444
2527
|
});
|
|
2445
2528
|
}, [open, hydrate]);
|
|
2446
|
-
(0,
|
|
2529
|
+
(0, import_react10.useEffect)(() => {
|
|
2447
2530
|
if (open) scrollToBottom();
|
|
2448
2531
|
}, [messages, loading, open, scrollToBottom]);
|
|
2449
2532
|
async function ask(text) {
|
|
@@ -2589,9 +2672,9 @@ function SuiteAiPanel({
|
|
|
2589
2672
|
);
|
|
2590
2673
|
}
|
|
2591
2674
|
const Icon = BrandIcon != null ? BrandIcon : import_iconoir_react8.Sparks;
|
|
2592
|
-
return /* @__PURE__ */ (0,
|
|
2593
|
-
!hideLauncher ? /* @__PURE__ */ (0,
|
|
2594
|
-
/* @__PURE__ */ (0,
|
|
2675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
2676
|
+
!hideLauncher ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
2677
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2595
2678
|
"button",
|
|
2596
2679
|
{
|
|
2597
2680
|
ref: launcherRef,
|
|
@@ -2614,15 +2697,15 @@ function SuiteAiPanel({
|
|
|
2614
2697
|
"aria-label": "Open Ask AI",
|
|
2615
2698
|
"aria-describedby": "suite-ask-ai-launcher-help",
|
|
2616
2699
|
children: [
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2700
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { className: "h-4 w-4 text-ph-brand" }),
|
|
2618
2701
|
"Ask AI"
|
|
2619
2702
|
]
|
|
2620
2703
|
}
|
|
2621
2704
|
),
|
|
2622
|
-
/* @__PURE__ */ (0,
|
|
2705
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { id: "suite-ask-ai-launcher-help", className: "sr-only", children: "Drag to reposition, or use arrow keys. The launcher docks to the nearest screen edge." })
|
|
2623
2706
|
] }) : null,
|
|
2624
|
-
open ? /* @__PURE__ */ (0,
|
|
2625
|
-
/* @__PURE__ */ (0,
|
|
2707
|
+
open ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "fixed inset-0 z-40", role: "dialog", "aria-modal": "true", children: [
|
|
2708
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2626
2709
|
"button",
|
|
2627
2710
|
{
|
|
2628
2711
|
type: "button",
|
|
@@ -2631,22 +2714,22 @@ function SuiteAiPanel({
|
|
|
2631
2714
|
"aria-label": "Close Ask AI"
|
|
2632
2715
|
}
|
|
2633
2716
|
),
|
|
2634
|
-
/* @__PURE__ */ (0,
|
|
2717
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2635
2718
|
"aside",
|
|
2636
2719
|
{
|
|
2637
2720
|
className: `absolute inset-y-0 flex w-full max-w-md flex-col bg-ph-surface shadow-2xl ${launcherSide === "left" ? "left-0 border-r border-ph-border" : "right-0 border-l border-ph-border"}`,
|
|
2638
2721
|
"data-test": "suite-ask-ai-panel",
|
|
2639
2722
|
children: [
|
|
2640
|
-
/* @__PURE__ */ (0,
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
2642
|
-
/* @__PURE__ */ (0,
|
|
2643
|
-
/* @__PURE__ */ (0,
|
|
2644
|
-
/* @__PURE__ */ (0,
|
|
2723
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center justify-between border-b border-ph-border px-4 py-3", children: [
|
|
2724
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "min-w-0", children: [
|
|
2725
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { className: "h-4 w-4 shrink-0 text-ph-brand" }),
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-semibold text-ph-ink", children: title })
|
|
2645
2728
|
] }),
|
|
2646
|
-
/* @__PURE__ */ (0,
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mt-0.5 text-[11px] text-ph-mutedtext", children: "Shared across your suite \xB7 same chat in every app" })
|
|
2647
2730
|
] }),
|
|
2648
|
-
/* @__PURE__ */ (0,
|
|
2649
|
-
messages.length > 0 ? /* @__PURE__ */ (0,
|
|
2731
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
2732
|
+
messages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2650
2733
|
"button",
|
|
2651
2734
|
{
|
|
2652
2735
|
type: "button",
|
|
@@ -2657,19 +2740,19 @@ function SuiteAiPanel({
|
|
|
2657
2740
|
children: "Clear"
|
|
2658
2741
|
}
|
|
2659
2742
|
) : null,
|
|
2660
|
-
/* @__PURE__ */ (0,
|
|
2743
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2661
2744
|
"button",
|
|
2662
2745
|
{
|
|
2663
2746
|
type: "button",
|
|
2664
2747
|
onClick: () => setOpen(false),
|
|
2665
2748
|
className: "rounded p-1 hover:bg-ph-muted",
|
|
2666
2749
|
"aria-label": "Close",
|
|
2667
|
-
children: /* @__PURE__ */ (0,
|
|
2750
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_iconoir_react8.Xmark, { className: "h-4 w-4" })
|
|
2668
2751
|
}
|
|
2669
2752
|
)
|
|
2670
2753
|
] })
|
|
2671
2754
|
] }),
|
|
2672
|
-
presets.length > 0 && messages.length === 0 ? /* @__PURE__ */ (0,
|
|
2755
|
+
presets.length > 0 && messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex flex-wrap gap-1.5 border-b border-ph-border px-4 py-2", children: presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2673
2756
|
"button",
|
|
2674
2757
|
{
|
|
2675
2758
|
type: "button",
|
|
@@ -2680,38 +2763,44 @@ function SuiteAiPanel({
|
|
|
2680
2763
|
},
|
|
2681
2764
|
preset.label
|
|
2682
2765
|
)) }) : null,
|
|
2683
|
-
/* @__PURE__ */ (0,
|
|
2766
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2684
2767
|
"div",
|
|
2685
2768
|
{
|
|
2686
2769
|
ref: scrollerRef,
|
|
2687
2770
|
className: "flex-1 space-y-3 overflow-y-auto p-4",
|
|
2688
2771
|
children: [
|
|
2689
|
-
error ? /* @__PURE__ */ (0,
|
|
2690
|
-
hydrating && messages.length === 0 ? /* @__PURE__ */ (0,
|
|
2691
|
-
/* @__PURE__ */ (0,
|
|
2772
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "bg-ph-danger/10 rounded-lg px-3 py-2 text-sm text-ph-danger", children: error }) : null,
|
|
2773
|
+
hydrating && messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2 text-sm text-ph-mutedtext", children: [
|
|
2774
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Spinner, { className: "h-4 w-4 animate-spin" }),
|
|
2692
2775
|
"Loading chat\u2026"
|
|
2693
2776
|
] }) : null,
|
|
2694
|
-
!hydrating && messages.length === 0 && !error ? /* @__PURE__ */ (0,
|
|
2695
|
-
/* @__PURE__ */ (0,
|
|
2696
|
-
/* @__PURE__ */ (0,
|
|
2777
|
+
!hydrating && messages.length === 0 && !error ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mt-10 px-2 text-center", children: [
|
|
2778
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "font-display text-base font-semibold text-ph-ink", children: "How can I help?" }),
|
|
2779
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mt-2 text-sm leading-relaxed text-ph-subtle", children: emptyState })
|
|
2697
2780
|
] }) : null,
|
|
2698
2781
|
messages.map((message, index) => {
|
|
2699
2782
|
const isUser = message.role === "user";
|
|
2700
|
-
return /* @__PURE__ */ (0,
|
|
2783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2701
2784
|
"div",
|
|
2702
2785
|
{
|
|
2703
2786
|
className: isUser ? "ml-8 rounded-2xl bg-ph-brand/10 px-3.5 py-2.5 text-sm text-ph-ink" : "mr-4 rounded-2xl bg-ph-muted px-3.5 py-2.5 text-sm text-ph-ink",
|
|
2704
2787
|
"data-test": isUser ? "ask-ai-user" : "ask-ai-assistant",
|
|
2705
2788
|
children: [
|
|
2706
|
-
/* @__PURE__ */ (0,
|
|
2707
|
-
|
|
2789
|
+
isUser ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "whitespace-pre-wrap", children: message.content }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2790
|
+
import_react10.Suspense,
|
|
2791
|
+
{
|
|
2792
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "whitespace-pre-wrap", children: message.content }),
|
|
2793
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SuiteAiBlockNoteMessage2, { markdown: message.content })
|
|
2794
|
+
}
|
|
2795
|
+
),
|
|
2796
|
+
!isUser ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2708
2797
|
"button",
|
|
2709
2798
|
{
|
|
2710
2799
|
type: "button",
|
|
2711
2800
|
onClick: () => void copyMessage(index, message.content),
|
|
2712
2801
|
className: "mt-2 inline-flex items-center gap-1 text-xs text-ph-mutedtext hover:text-ph-ink",
|
|
2713
2802
|
children: [
|
|
2714
|
-
copiedId === index ? /* @__PURE__ */ (0,
|
|
2803
|
+
copiedId === index ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_iconoir_react8.Check, { className: "h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_iconoir_react8.Copy, { className: "h-3 w-3" }),
|
|
2715
2804
|
copiedId === index ? "Copied" : "Copy"
|
|
2716
2805
|
]
|
|
2717
2806
|
}
|
|
@@ -2721,15 +2810,15 @@ function SuiteAiPanel({
|
|
|
2721
2810
|
`${message.role}-${index}-${message.content.slice(0, 24)}`
|
|
2722
2811
|
);
|
|
2723
2812
|
}),
|
|
2724
|
-
loading ? /* @__PURE__ */ (0,
|
|
2725
|
-
/* @__PURE__ */ (0,
|
|
2813
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex items-center gap-2 text-sm text-ph-mutedtext", children: [
|
|
2814
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Spinner, { className: "h-4 w-4 animate-spin" }),
|
|
2726
2815
|
"Thinking\u2026"
|
|
2727
2816
|
] }) : null
|
|
2728
2817
|
]
|
|
2729
2818
|
}
|
|
2730
2819
|
),
|
|
2731
|
-
/* @__PURE__ */ (0,
|
|
2732
|
-
/* @__PURE__ */ (0,
|
|
2820
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "border-t border-ph-border p-3", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex gap-2", children: [
|
|
2821
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2733
2822
|
"textarea",
|
|
2734
2823
|
{
|
|
2735
2824
|
value: prompt,
|
|
@@ -2747,7 +2836,7 @@ function SuiteAiPanel({
|
|
|
2747
2836
|
className: "flex-1 resize-none rounded-xl border border-ph-border bg-ph-canvas p-2.5 text-sm text-ph-ink outline-none focus:ring-1 focus:ring-ph-brand"
|
|
2748
2837
|
}
|
|
2749
2838
|
),
|
|
2750
|
-
/* @__PURE__ */ (0,
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2751
2840
|
"button",
|
|
2752
2841
|
{
|
|
2753
2842
|
type: "button",
|
|
@@ -2767,7 +2856,7 @@ function SuiteAiPanel({
|
|
|
2767
2856
|
}
|
|
2768
2857
|
|
|
2769
2858
|
// src/suite/lib/use-sidebar-width.ts
|
|
2770
|
-
var
|
|
2859
|
+
var import_react11 = require("react");
|
|
2771
2860
|
var SIDEBAR_RAIL_WIDTH = 56;
|
|
2772
2861
|
var SIDEBAR_COLLAPSE_THRESHOLD = 80;
|
|
2773
2862
|
var SIDEBAR_MIN_EXPANDED_WIDTH = 180;
|
|
@@ -2782,10 +2871,10 @@ function snapWidth(width) {
|
|
|
2782
2871
|
return Math.min(SIDEBAR_MAX_WIDTH, width);
|
|
2783
2872
|
}
|
|
2784
2873
|
function useSidebarWidth(storageKey) {
|
|
2785
|
-
const [width, setWidth] = (0,
|
|
2786
|
-
const [narrowViewport, setNarrowViewport] = (0,
|
|
2874
|
+
const [width, setWidth] = (0, import_react11.useState)(SIDEBAR_DEFAULT_WIDTH);
|
|
2875
|
+
const [narrowViewport, setNarrowViewport] = (0, import_react11.useState)(false);
|
|
2787
2876
|
const collapsed = narrowViewport || width <= SIDEBAR_COLLAPSE_THRESHOLD;
|
|
2788
|
-
(0,
|
|
2877
|
+
(0, import_react11.useEffect)(() => {
|
|
2789
2878
|
let stored = null;
|
|
2790
2879
|
try {
|
|
2791
2880
|
stored = localStorage.getItem(storageKey);
|
|
@@ -2797,14 +2886,14 @@ function useSidebarWidth(storageKey) {
|
|
|
2797
2886
|
queueMicrotask(() => setWidth(snapWidth(clampWidth(parsed))));
|
|
2798
2887
|
}
|
|
2799
2888
|
}, [storageKey]);
|
|
2800
|
-
(0,
|
|
2889
|
+
(0, import_react11.useEffect)(() => {
|
|
2801
2890
|
const media = window.matchMedia("(max-width: 639px)");
|
|
2802
2891
|
const sync = () => setNarrowViewport(media.matches);
|
|
2803
2892
|
sync();
|
|
2804
2893
|
media.addEventListener("change", sync);
|
|
2805
2894
|
return () => media.removeEventListener("change", sync);
|
|
2806
2895
|
}, []);
|
|
2807
|
-
const persist = (0,
|
|
2896
|
+
const persist = (0, import_react11.useCallback)(
|
|
2808
2897
|
(value) => {
|
|
2809
2898
|
try {
|
|
2810
2899
|
localStorage.setItem(storageKey, String(value));
|
|
@@ -2813,7 +2902,7 @@ function useSidebarWidth(storageKey) {
|
|
|
2813
2902
|
},
|
|
2814
2903
|
[storageKey]
|
|
2815
2904
|
);
|
|
2816
|
-
const setCollapsed = (0,
|
|
2905
|
+
const setCollapsed = (0, import_react11.useCallback)(
|
|
2817
2906
|
(value) => {
|
|
2818
2907
|
setWidth((current) => {
|
|
2819
2908
|
const next = value ? SIDEBAR_RAIL_WIDTH : current <= SIDEBAR_COLLAPSE_THRESHOLD ? SIDEBAR_DEFAULT_WIDTH : snapWidth(current);
|
|
@@ -2823,11 +2912,11 @@ function useSidebarWidth(storageKey) {
|
|
|
2823
2912
|
},
|
|
2824
2913
|
[persist]
|
|
2825
2914
|
);
|
|
2826
|
-
const resetWidth = (0,
|
|
2915
|
+
const resetWidth = (0, import_react11.useCallback)(() => {
|
|
2827
2916
|
setWidth(SIDEBAR_DEFAULT_WIDTH);
|
|
2828
2917
|
persist(SIDEBAR_DEFAULT_WIDTH);
|
|
2829
2918
|
}, [persist]);
|
|
2830
|
-
const startResize = (0,
|
|
2919
|
+
const startResize = (0, import_react11.useCallback)(
|
|
2831
2920
|
(event) => {
|
|
2832
2921
|
event.preventDefault();
|
|
2833
2922
|
const startX = event.clientX;
|
|
@@ -2853,10 +2942,10 @@ function useSidebarWidth(storageKey) {
|
|
|
2853
2942
|
}
|
|
2854
2943
|
|
|
2855
2944
|
// src/suite/lib/motion.tsx
|
|
2856
|
-
var
|
|
2857
|
-
var
|
|
2945
|
+
var import_react12 = require("motion/react");
|
|
2946
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2858
2947
|
function SuiteMotionProvider({ children }) {
|
|
2859
|
-
return /* @__PURE__ */ (0,
|
|
2948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react12.LazyMotion, { features: import_react12.domAnimation, strict: true, children });
|
|
2860
2949
|
}
|
|
2861
2950
|
var SUITE_SPRINGS = {
|
|
2862
2951
|
/** Snappy panel/sheet entrances — small overshoot. */
|
|
@@ -2868,24 +2957,24 @@ var SUITE_SPRINGS = {
|
|
|
2868
2957
|
};
|
|
2869
2958
|
|
|
2870
2959
|
// src/suite/components/suite-skeleton.tsx
|
|
2871
|
-
var
|
|
2960
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2872
2961
|
function SuiteSkeleton({
|
|
2873
2962
|
className,
|
|
2874
2963
|
lines = 1,
|
|
2875
2964
|
circle,
|
|
2876
2965
|
width
|
|
2877
2966
|
}) {
|
|
2878
|
-
return /* @__PURE__ */ (0,
|
|
2967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2879
2968
|
"div",
|
|
2880
2969
|
{
|
|
2881
2970
|
className: cn("space-y-2", circle ? "flex flex-col items-center" : ""),
|
|
2882
2971
|
"aria-hidden": true,
|
|
2883
|
-
children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ (0,
|
|
2972
|
+
children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2884
2973
|
"div",
|
|
2885
2974
|
{
|
|
2886
2975
|
className: "animate-[skeleton-stagger_0.6s_ease-out_both]",
|
|
2887
2976
|
style: { animationDelay: `${index * 80}ms` },
|
|
2888
|
-
children: /* @__PURE__ */ (0,
|
|
2977
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2889
2978
|
"div",
|
|
2890
2979
|
{
|
|
2891
2980
|
className: cn(
|
|
@@ -2909,7 +2998,7 @@ function SuiteSkeletonCard({
|
|
|
2909
2998
|
rows = 3,
|
|
2910
2999
|
header = true
|
|
2911
3000
|
}) {
|
|
2912
|
-
return /* @__PURE__ */ (0,
|
|
3001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2913
3002
|
"div",
|
|
2914
3003
|
{
|
|
2915
3004
|
className: cn(
|
|
@@ -2918,26 +3007,26 @@ function SuiteSkeletonCard({
|
|
|
2918
3007
|
),
|
|
2919
3008
|
"aria-hidden": true,
|
|
2920
3009
|
children: [
|
|
2921
|
-
header ? /* @__PURE__ */ (0,
|
|
3010
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2922
3011
|
"div",
|
|
2923
3012
|
{
|
|
2924
3013
|
className: "mb-5 flex items-center gap-3 animate-[skeleton-stagger_0.5s_ease-out_both]",
|
|
2925
3014
|
style: { animationDelay: "100ms" },
|
|
2926
3015
|
children: [
|
|
2927
|
-
/* @__PURE__ */ (0,
|
|
2928
|
-
/* @__PURE__ */ (0,
|
|
2929
|
-
/* @__PURE__ */ (0,
|
|
2930
|
-
/* @__PURE__ */ (0,
|
|
3016
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ph-skeleton h-10 w-10 rounded-xl" }),
|
|
3017
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
3018
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ph-skeleton h-4 w-1/3" }),
|
|
3019
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ph-skeleton h-3 w-1/2" })
|
|
2931
3020
|
] })
|
|
2932
3021
|
]
|
|
2933
3022
|
}
|
|
2934
3023
|
) : null,
|
|
2935
|
-
/* @__PURE__ */ (0,
|
|
3024
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-3", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2936
3025
|
"div",
|
|
2937
3026
|
{
|
|
2938
3027
|
className: "animate-[skeleton-stagger_0.5s_ease-out_both]",
|
|
2939
3028
|
style: { animationDelay: `${200 + index * 80}ms` },
|
|
2940
|
-
children: /* @__PURE__ */ (0,
|
|
3029
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2941
3030
|
"div",
|
|
2942
3031
|
{
|
|
2943
3032
|
className: "ph-skeleton h-3",
|
|
@@ -2955,16 +3044,16 @@ function SuiteSkeletonList({
|
|
|
2955
3044
|
className,
|
|
2956
3045
|
items = 4
|
|
2957
3046
|
}) {
|
|
2958
|
-
return /* @__PURE__ */ (0,
|
|
3047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("space-y-3", className), "aria-hidden": true, children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2959
3048
|
"div",
|
|
2960
3049
|
{
|
|
2961
3050
|
className: "animate-[skeleton-stagger_0.6s_ease-out_both]",
|
|
2962
3051
|
style: { animationDelay: `${index * 100}ms` },
|
|
2963
|
-
children: /* @__PURE__ */ (0,
|
|
2964
|
-
/* @__PURE__ */ (0,
|
|
2965
|
-
/* @__PURE__ */ (0,
|
|
2966
|
-
/* @__PURE__ */ (0,
|
|
2967
|
-
/* @__PURE__ */ (0,
|
|
3052
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-3 rounded-xl border border-ph-border bg-ph-surface p-4", children: [
|
|
3053
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ph-skeleton h-10 w-10 rounded-lg" }),
|
|
3054
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "min-w-0 flex-1 space-y-2", children: [
|
|
3055
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ph-skeleton h-3.5 w-3/4" }),
|
|
3056
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ph-skeleton h-3 w-1/2" })
|
|
2968
3057
|
] })
|
|
2969
3058
|
] })
|
|
2970
3059
|
},
|
|
@@ -2979,7 +3068,7 @@ function SuiteEmptyState({
|
|
|
2979
3068
|
className,
|
|
2980
3069
|
size = "md"
|
|
2981
3070
|
}) {
|
|
2982
|
-
return /* @__PURE__ */ (0,
|
|
3071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2983
3072
|
"div",
|
|
2984
3073
|
{
|
|
2985
3074
|
className: cn(
|
|
@@ -2988,13 +3077,13 @@ function SuiteEmptyState({
|
|
|
2988
3077
|
className
|
|
2989
3078
|
),
|
|
2990
3079
|
children: [
|
|
2991
|
-
/* @__PURE__ */ (0,
|
|
2992
|
-
/* @__PURE__ */ (0,
|
|
2993
|
-
/* @__PURE__ */ (0,
|
|
3080
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "pointer-events-none absolute inset-0 overflow-hidden opacity-60", "aria-hidden": true, children: [
|
|
3081
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "absolute -left-10 -top-10 h-40 w-40 rounded-full bg-ph-brand/10 blur-3xl" }),
|
|
3082
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "absolute -bottom-10 -right-10 h-40 w-40 rounded-full bg-ph-accent/10 blur-3xl" })
|
|
2994
3083
|
] }),
|
|
2995
|
-
/* @__PURE__ */ (0,
|
|
2996
|
-
icon ? /* @__PURE__ */ (0,
|
|
2997
|
-
/* @__PURE__ */ (0,
|
|
3084
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "relative", children: [
|
|
3085
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "mx-auto mb-4 inline-flex items-center justify-center rounded-2xl bg-ph-muted p-3 shadow-sm ring-1 ring-black/[0.06]", children: icon }) : null,
|
|
3086
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2998
3087
|
"h3",
|
|
2999
3088
|
{
|
|
3000
3089
|
className: cn(
|
|
@@ -3004,8 +3093,8 @@ function SuiteEmptyState({
|
|
|
3004
3093
|
children: title
|
|
3005
3094
|
}
|
|
3006
3095
|
),
|
|
3007
|
-
description ? /* @__PURE__ */ (0,
|
|
3008
|
-
action ? /* @__PURE__ */ (0,
|
|
3096
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "mx-auto mt-2 max-w-sm text-sm leading-relaxed text-ph-subtle", children: description }) : null,
|
|
3097
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "mt-5 flex flex-wrap items-center justify-center gap-2", children: action }) : null
|
|
3009
3098
|
] })
|
|
3010
3099
|
]
|
|
3011
3100
|
}
|
|
@@ -3013,8 +3102,8 @@ function SuiteEmptyState({
|
|
|
3013
3102
|
}
|
|
3014
3103
|
|
|
3015
3104
|
// src/suite/components/suite-settings-mobile-nav.tsx
|
|
3016
|
-
var
|
|
3017
|
-
var
|
|
3105
|
+
var import_react13 = require("react");
|
|
3106
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3018
3107
|
function SuiteSettingsMobileNav({
|
|
3019
3108
|
items,
|
|
3020
3109
|
activeHref,
|
|
@@ -3023,16 +3112,16 @@ function SuiteSettingsMobileNav({
|
|
|
3023
3112
|
ariaLabel = "Settings sections",
|
|
3024
3113
|
className
|
|
3025
3114
|
}) {
|
|
3026
|
-
return /* @__PURE__ */ (0,
|
|
3115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3027
3116
|
"nav",
|
|
3028
3117
|
{
|
|
3029
3118
|
"data-test": dataTest,
|
|
3030
3119
|
"aria-label": ariaLabel,
|
|
3031
3120
|
className: cn("suite-settings-mobile-nav lg:hidden", className),
|
|
3032
|
-
children: /* @__PURE__ */ (0,
|
|
3121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex snap-x gap-2 overflow-x-auto pb-3 pt-1 scrollbar-hide [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: items.map((item) => {
|
|
3033
3122
|
const Icon = item.icon;
|
|
3034
3123
|
const active = activeHref === item.href || activeHref.startsWith(`${item.href}/`);
|
|
3035
|
-
const iconNode = (0,
|
|
3124
|
+
const iconNode = (0, import_react13.isValidElement)(item.icon) ? item.icon : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3036
3125
|
Icon,
|
|
3037
3126
|
{
|
|
3038
3127
|
className: cn(
|
|
@@ -3042,7 +3131,7 @@ function SuiteSettingsMobileNav({
|
|
|
3042
3131
|
"aria-hidden": true
|
|
3043
3132
|
}
|
|
3044
3133
|
);
|
|
3045
|
-
return /* @__PURE__ */ (0,
|
|
3134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3046
3135
|
"button",
|
|
3047
3136
|
{
|
|
3048
3137
|
type: "button",
|
|
@@ -3056,8 +3145,8 @@ function SuiteSettingsMobileNav({
|
|
|
3056
3145
|
),
|
|
3057
3146
|
children: [
|
|
3058
3147
|
iconNode,
|
|
3059
|
-
/* @__PURE__ */ (0,
|
|
3060
|
-
active ? /* @__PURE__ */ (0,
|
|
3148
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "whitespace-nowrap", children: item.label }),
|
|
3149
|
+
active ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "absolute inset-x-0 -bottom-3 h-0.5 rounded-full bg-ph-ink lg:hidden" }) : null
|
|
3061
3150
|
]
|
|
3062
3151
|
},
|
|
3063
3152
|
item.href
|
|
@@ -3071,10 +3160,10 @@ function SuiteSettingsMobileNav({
|
|
|
3071
3160
|
var import_link2 = __toESM(require("next/link"));
|
|
3072
3161
|
|
|
3073
3162
|
// src/components/ui/Tooltip.tsx
|
|
3074
|
-
var
|
|
3163
|
+
var import_react14 = require("react");
|
|
3075
3164
|
var import_react_dom = require("react-dom");
|
|
3076
|
-
var
|
|
3077
|
-
var TooltipDelayContext = (0,
|
|
3165
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3166
|
+
var TooltipDelayContext = (0, import_react14.createContext)(0);
|
|
3078
3167
|
function tooltipPosition(trigger, side, align, offset) {
|
|
3079
3168
|
const horizontal = align === "start" ? trigger.left : align === "end" ? trigger.right : trigger.left + trigger.width / 2;
|
|
3080
3169
|
const vertical = align === "start" ? trigger.top : align === "end" ? trigger.bottom : trigger.top + trigger.height / 2;
|
|
@@ -3114,12 +3203,12 @@ function Tooltip({
|
|
|
3114
3203
|
onOpenChange,
|
|
3115
3204
|
delayDuration
|
|
3116
3205
|
}) {
|
|
3117
|
-
const providerDelay = (0,
|
|
3118
|
-
const generatedId = (0,
|
|
3119
|
-
const triggerRef = (0,
|
|
3120
|
-
const timerRef = (0,
|
|
3121
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
3122
|
-
const [position, setPosition] = (0,
|
|
3206
|
+
const providerDelay = (0, import_react14.useContext)(TooltipDelayContext);
|
|
3207
|
+
const generatedId = (0, import_react14.useId)().replace(/:/g, "");
|
|
3208
|
+
const triggerRef = (0, import_react14.useRef)(null);
|
|
3209
|
+
const timerRef = (0, import_react14.useRef)(null);
|
|
3210
|
+
const [internalOpen, setInternalOpen] = (0, import_react14.useState)(defaultOpen);
|
|
3211
|
+
const [position, setPosition] = (0, import_react14.useState)(null);
|
|
3123
3212
|
const isOpen = open != null ? open : internalOpen;
|
|
3124
3213
|
const triggerId = children.props.id;
|
|
3125
3214
|
const tooltipId = triggerId ? `${triggerId}-tooltip` : `ph-tooltip-${generatedId}`;
|
|
@@ -3153,7 +3242,7 @@ function Tooltip({
|
|
|
3153
3242
|
clearTimer();
|
|
3154
3243
|
setOpen(false);
|
|
3155
3244
|
}
|
|
3156
|
-
(0,
|
|
3245
|
+
(0, import_react14.useEffect)(() => {
|
|
3157
3246
|
if (!isOpen) return;
|
|
3158
3247
|
const reposition = () => updatePosition();
|
|
3159
3248
|
window.addEventListener("resize", reposition);
|
|
@@ -3163,11 +3252,11 @@ function Tooltip({
|
|
|
3163
3252
|
window.removeEventListener("scroll", reposition, true);
|
|
3164
3253
|
};
|
|
3165
3254
|
});
|
|
3166
|
-
(0,
|
|
3255
|
+
(0, import_react14.useEffect)(() => () => clearTimer(), []);
|
|
3167
3256
|
const describedBy = [children.props["aria-describedby"], tooltipId].filter(Boolean).join(" ");
|
|
3168
|
-
const trigger = (0,
|
|
3169
|
-
return /* @__PURE__ */ (0,
|
|
3170
|
-
/* @__PURE__ */ (0,
|
|
3257
|
+
const trigger = (0, import_react14.cloneElement)(children, { "aria-describedby": describedBy });
|
|
3258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
3259
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3171
3260
|
"span",
|
|
3172
3261
|
{
|
|
3173
3262
|
ref: triggerRef,
|
|
@@ -3183,12 +3272,12 @@ function Tooltip({
|
|
|
3183
3272
|
}
|
|
3184
3273
|
),
|
|
3185
3274
|
isOpen && position && typeof document !== "undefined" ? (0, import_react_dom.createPortal)(
|
|
3186
|
-
/* @__PURE__ */ (0,
|
|
3275
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3187
3276
|
"span",
|
|
3188
3277
|
{
|
|
3189
3278
|
style: __spreadValues({ position: "fixed" }, position),
|
|
3190
3279
|
className: "pointer-events-none z-[200]",
|
|
3191
|
-
children: /* @__PURE__ */ (0,
|
|
3280
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3192
3281
|
"span",
|
|
3193
3282
|
{
|
|
3194
3283
|
id: tooltipId,
|
|
@@ -3206,7 +3295,7 @@ function Tooltip({
|
|
|
3206
3295
|
}
|
|
3207
3296
|
|
|
3208
3297
|
// src/suite/components/suite-sidebar.tsx
|
|
3209
|
-
var
|
|
3298
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3210
3299
|
function renderNode(node, collapsed) {
|
|
3211
3300
|
if (typeof node === "function") return node(collapsed);
|
|
3212
3301
|
return node;
|
|
@@ -3223,7 +3312,7 @@ function SuiteSidebar({
|
|
|
3223
3312
|
className,
|
|
3224
3313
|
surface = false
|
|
3225
3314
|
}) {
|
|
3226
|
-
return /* @__PURE__ */ (0,
|
|
3315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3227
3316
|
"div",
|
|
3228
3317
|
{
|
|
3229
3318
|
className: cn(
|
|
@@ -3232,7 +3321,7 @@ function SuiteSidebar({
|
|
|
3232
3321
|
className
|
|
3233
3322
|
),
|
|
3234
3323
|
children: [
|
|
3235
|
-
/* @__PURE__ */ (0,
|
|
3324
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3236
3325
|
"div",
|
|
3237
3326
|
{
|
|
3238
3327
|
className: cn(
|
|
@@ -3241,12 +3330,12 @@ function SuiteSidebar({
|
|
|
3241
3330
|
collapsed ? "flex-col items-center gap-1 px-1 py-2" : "h-14 items-center justify-between gap-2 px-3"
|
|
3242
3331
|
),
|
|
3243
3332
|
children: [
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3245
|
-
collapsed ? null : /* @__PURE__ */ (0,
|
|
3333
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn("min-w-0", collapsed ? "shrink-0" : "flex-1"), children: renderNode(appSwitcher, collapsed) }),
|
|
3334
|
+
collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "shrink-0", children: renderNode(notificationBell, collapsed) })
|
|
3246
3335
|
]
|
|
3247
3336
|
}
|
|
3248
3337
|
),
|
|
3249
|
-
/* @__PURE__ */ (0,
|
|
3338
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3250
3339
|
"div",
|
|
3251
3340
|
{
|
|
3252
3341
|
className: cn(
|
|
@@ -3255,17 +3344,17 @@ function SuiteSidebar({
|
|
|
3255
3344
|
collapsed ? "px-1.5 py-2" : "p-2"
|
|
3256
3345
|
),
|
|
3257
3346
|
children: [
|
|
3258
|
-
/* @__PURE__ */ (0,
|
|
3347
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3259
3348
|
"nav",
|
|
3260
3349
|
{
|
|
3261
3350
|
"aria-label": "Pages",
|
|
3262
3351
|
className: "shrink-0 space-y-0.5",
|
|
3263
3352
|
children: [
|
|
3264
|
-
/* @__PURE__ */ (0,
|
|
3265
|
-
/* @__PURE__ */ (0,
|
|
3353
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn("mb-3", collapsed && "flex justify-center"), children: renderNode(contextSwitcher, collapsed) }),
|
|
3354
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "space-y-0.5", children: navItems.map((item) => {
|
|
3266
3355
|
const Icon = item.icon;
|
|
3267
3356
|
const active = Boolean(item.active);
|
|
3268
|
-
const link = /* @__PURE__ */ (0,
|
|
3357
|
+
const link = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3269
3358
|
import_link2.default,
|
|
3270
3359
|
{
|
|
3271
3360
|
href: item.href,
|
|
@@ -3278,7 +3367,7 @@ function SuiteSidebar({
|
|
|
3278
3367
|
collapsed ? "mx-auto size-10 shrink-0 justify-center gap-0 px-0 py-0" : "w-full px-2.5 py-2"
|
|
3279
3368
|
),
|
|
3280
3369
|
children: [
|
|
3281
|
-
/* @__PURE__ */ (0,
|
|
3370
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3282
3371
|
"span",
|
|
3283
3372
|
{
|
|
3284
3373
|
className: cn(
|
|
@@ -3286,7 +3375,7 @@ function SuiteSidebar({
|
|
|
3286
3375
|
item.iconClassName
|
|
3287
3376
|
),
|
|
3288
3377
|
"aria-hidden": true,
|
|
3289
|
-
children: /* @__PURE__ */ (0,
|
|
3378
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3290
3379
|
Icon,
|
|
3291
3380
|
{
|
|
3292
3381
|
className: "h-full w-full",
|
|
@@ -3295,7 +3384,7 @@ function SuiteSidebar({
|
|
|
3295
3384
|
)
|
|
3296
3385
|
}
|
|
3297
3386
|
),
|
|
3298
|
-
/* @__PURE__ */ (0,
|
|
3387
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3299
3388
|
"span",
|
|
3300
3389
|
{
|
|
3301
3390
|
className: cn(
|
|
@@ -3306,17 +3395,17 @@ function SuiteSidebar({
|
|
|
3306
3395
|
children: item.label
|
|
3307
3396
|
}
|
|
3308
3397
|
),
|
|
3309
|
-
!collapsed && item.badge ? /* @__PURE__ */ (0,
|
|
3398
|
+
!collapsed && item.badge ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "relative ml-auto shrink-0", children: item.badge }) : null
|
|
3310
3399
|
]
|
|
3311
3400
|
},
|
|
3312
3401
|
item.label
|
|
3313
3402
|
);
|
|
3314
|
-
return collapsed ? /* @__PURE__ */ (0,
|
|
3403
|
+
return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Tooltip, { content: item.label, side: "right", children: link }, item.label) : link;
|
|
3315
3404
|
}) })
|
|
3316
3405
|
]
|
|
3317
3406
|
}
|
|
3318
3407
|
),
|
|
3319
|
-
secondaryNav ? /* @__PURE__ */ (0,
|
|
3408
|
+
secondaryNav ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3320
3409
|
"div",
|
|
3321
3410
|
{
|
|
3322
3411
|
className: "min-h-0 flex-1",
|
|
@@ -3327,7 +3416,7 @@ function SuiteSidebar({
|
|
|
3327
3416
|
]
|
|
3328
3417
|
}
|
|
3329
3418
|
),
|
|
3330
|
-
/* @__PURE__ */ (0,
|
|
3419
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3331
3420
|
"div",
|
|
3332
3421
|
{
|
|
3333
3422
|
className: cn(
|
|
@@ -3335,7 +3424,7 @@ function SuiteSidebar({
|
|
|
3335
3424
|
surface ? "bg-ph-surface" : "bg-ph-canvas",
|
|
3336
3425
|
collapsed ? "p-1.5" : "p-3"
|
|
3337
3426
|
),
|
|
3338
|
-
children: /* @__PURE__ */ (0,
|
|
3427
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3339
3428
|
"div",
|
|
3340
3429
|
{
|
|
3341
3430
|
className: cn(
|
|
@@ -3344,7 +3433,7 @@ function SuiteSidebar({
|
|
|
3344
3433
|
),
|
|
3345
3434
|
children: [
|
|
3346
3435
|
renderNode(userMenu, collapsed),
|
|
3347
|
-
!collapsed && footerExtras ? /* @__PURE__ */ (0,
|
|
3436
|
+
!collapsed && footerExtras ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "ml-auto shrink-0", children: renderNode(footerExtras, collapsed) }) : null
|
|
3348
3437
|
]
|
|
3349
3438
|
}
|
|
3350
3439
|
)
|
|
@@ -3356,7 +3445,7 @@ function SuiteSidebar({
|
|
|
3356
3445
|
}
|
|
3357
3446
|
|
|
3358
3447
|
// src/suite/components/suite-app-layout.tsx
|
|
3359
|
-
var
|
|
3448
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3360
3449
|
function SuiteAppLayout({
|
|
3361
3450
|
sidebar,
|
|
3362
3451
|
children,
|
|
@@ -3369,13 +3458,13 @@ function SuiteAppLayout({
|
|
|
3369
3458
|
onResetWidth,
|
|
3370
3459
|
className
|
|
3371
3460
|
}) {
|
|
3372
|
-
return /* @__PURE__ */ (0,
|
|
3461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3373
3462
|
"div",
|
|
3374
3463
|
{
|
|
3375
3464
|
"data-test": "app-shell",
|
|
3376
3465
|
className: cn("flex min-h-dvh lg:h-screen lg:overflow-hidden", className),
|
|
3377
3466
|
children: [
|
|
3378
|
-
/* @__PURE__ */ (0,
|
|
3467
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3379
3468
|
"aside",
|
|
3380
3469
|
{
|
|
3381
3470
|
className: "relative hidden shrink-0 flex-col overflow-hidden border-r border-ph-border transition-[width] duration-200 ease-out lg:flex",
|
|
@@ -3383,7 +3472,7 @@ function SuiteAppLayout({
|
|
|
3383
3472
|
"data-collapsed": collapsed ? "true" : "false",
|
|
3384
3473
|
children: [
|
|
3385
3474
|
sidebar,
|
|
3386
|
-
onStartResize ? /* @__PURE__ */ (0,
|
|
3475
|
+
onStartResize ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3387
3476
|
"div",
|
|
3388
3477
|
{
|
|
3389
3478
|
role: "separator",
|
|
@@ -3397,9 +3486,9 @@ function SuiteAppLayout({
|
|
|
3397
3486
|
]
|
|
3398
3487
|
}
|
|
3399
3488
|
),
|
|
3400
|
-
/* @__PURE__ */ (0,
|
|
3401
|
-
mobileHeader ? /* @__PURE__ */ (0,
|
|
3402
|
-
/* @__PURE__ */ (0,
|
|
3489
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
3490
|
+
mobileHeader ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "shrink-0 lg:hidden", children: mobileHeader }) : null,
|
|
3491
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3403
3492
|
"main",
|
|
3404
3493
|
{
|
|
3405
3494
|
id: "main-content",
|
|
@@ -3412,7 +3501,7 @@ function SuiteAppLayout({
|
|
|
3412
3501
|
children
|
|
3413
3502
|
}
|
|
3414
3503
|
),
|
|
3415
|
-
bottomNav ? /* @__PURE__ */ (0,
|
|
3504
|
+
bottomNav ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "shrink-0 lg:hidden", children: bottomNav }) : null
|
|
3416
3505
|
] })
|
|
3417
3506
|
]
|
|
3418
3507
|
}
|