@termix-ssh/plugin-sdk 1.0.20 → 1.0.22
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/CHANGELOG.md +29 -0
- package/PLUGIN-GUIDE.md +66 -4
- package/cli/commands/build.mjs +55 -36
- package/cli/commands/validate.mjs +4 -0
- package/dist/backend.d.ts +32 -7
- package/dist/frontend.d.ts +7 -0
- package/dist/host/{PluginsTab-ZSMTJ5C5.js → PluginsTab-CM2B33BD.js} +26 -16
- package/dist/host/chunk-7J4QNGFM.js +345 -0
- package/dist/host/{chunk-J3ZQPBDK.js → chunk-HQ6NNFSX.js} +115 -1575
- package/dist/host/chunk-I5F2PSMR.js +1526 -0
- package/dist/host/{chunk-2MU6WNSX.js → chunk-JRV2HIDK.js} +1 -1
- package/dist/host/{chunk-7LEJ3HYF.js → chunk-P26QKKU5.js} +41 -10
- package/dist/host/{chunk-CITUENSU.js → chunk-ROB2SH5Q.js} +77 -49
- package/dist/host/chunk-TK3Y437H.js +53 -0
- package/dist/host/{chunk-EYONBBRJ.js → chunk-VKNGNEF3.js} +34650 -34968
- package/dist/host/core-classes.json +1 -1
- package/dist/host/frame-host.css +2 -0
- package/dist/host/frame-host.js +242 -0
- package/dist/host/{linked-server-OUF3POT7.js → linked-server-J5G457OA.js} +1 -1
- package/dist/host/{rbac-api-LZVENREG.js → rbac-api-PY22W5UY.js} +5 -1
- package/dist/host/testing-host.js +9 -6
- package/dist/host/types/src/types/host-sidebar-preferences.d.ts +2 -0
- package/dist/host/types/src/types/index.d.ts +8 -0
- package/dist/host/types/src/ui/api/look-api.d.ts +2 -0
- package/dist/host/types/src/ui/api/plugins-api.d.ts +3 -2
- package/dist/host/types/src/ui/api/rbac-api.d.ts +19 -1
- package/dist/host/types/src/ui/components/data-view.d.ts +1 -1
- package/dist/host/types/src/ui/lib/app-return.d.ts +13 -0
- package/dist/host/types/src/ui/main-axios.d.ts +1 -1
- package/dist/host/types/src/ui/plugin-host/loader.d.ts +6 -0
- package/dist/host/types/src/ui/plugin-host/sdk-ui.d.ts +1 -1
- package/dist/host/types/src/ui/plugins/plugin-model.d.ts +1 -1
- package/dist/host/types/src/ui/plugins/use-plugins-manager.d.ts +1 -1
- package/dist/host/types/src/ui/shell/tab-registry.d.ts +2 -0
- package/dist/host/ui.js +418 -388
- package/dist/host/{use-permissions-BYCDS5PD.js → use-permissions-EWRI3WLT.js} +1 -1
- package/dist/host-commands.d.ts +9 -6
- package/dist/host-commands.js +38 -11
- package/dist/host-scripts/docker.d.ts +137 -0
- package/dist/host-scripts/docker.js +345 -0
- package/dist/host-scripts/index.d.ts +15 -0
- package/dist/host-scripts/index.js +15 -0
- package/dist/host-scripts/journal.d.ts +45 -0
- package/dist/host-scripts/journal.js +194 -0
- package/dist/host-scripts/metrics.d.ts +134 -0
- package/dist/host-scripts/metrics.js +320 -0
- package/dist/host-scripts/openrc.d.ts +6 -0
- package/dist/host-scripts/openrc.js +90 -0
- package/dist/host-scripts/shell.d.ts +43 -0
- package/dist/host-scripts/shell.js +95 -0
- package/dist/host-scripts/systemd.d.ts +73 -0
- package/dist/host-scripts/systemd.js +320 -0
- package/dist/host-scripts/text.d.ts +23 -0
- package/dist/host-scripts/text.js +111 -0
- package/dist/manifest.d.ts +28 -1
- package/dist/manifest.js +108 -1
- package/package.json +9 -1
- package/schema/manifest.schema.json +42 -0
|
@@ -26,7 +26,7 @@ var inFlight = null;
|
|
|
26
26
|
function load() {
|
|
27
27
|
if (cache) return Promise.resolve(cache);
|
|
28
28
|
if (inFlight) return inFlight;
|
|
29
|
-
inFlight = import("./rbac-api-
|
|
29
|
+
inFlight = import("./rbac-api-PY22W5UY.js").then(({ getMyPermissions }) => getMyPermissions()).then((result) => {
|
|
30
30
|
cache = {
|
|
31
31
|
permissions: result.permissions ?? [],
|
|
32
32
|
isAdmin: !!result.isAdmin
|
|
@@ -4087,7 +4087,9 @@ function unregisteredViewStatus(kind, id) {
|
|
|
4087
4087
|
return { status: getPluginStoreState().loaded ? "missing" : "loading" };
|
|
4088
4088
|
}
|
|
4089
4089
|
const serverState = owner.summary.state;
|
|
4090
|
-
if (!owner.summary.enabled
|
|
4090
|
+
if (!owner.summary.enabled || serverState === "safe-mode") {
|
|
4091
|
+
return { status: "disabled", owner };
|
|
4092
|
+
}
|
|
4091
4093
|
if (owner.frontend === "failed" || owner.frontend === "blocked" || serverState === "failed" || serverState === "blocked") {
|
|
4092
4094
|
return { status: "failed", owner };
|
|
4093
4095
|
}
|
|
@@ -4426,7 +4428,7 @@ var FrontendLogger = class {
|
|
|
4426
4428
|
this.serviceName = serviceName;
|
|
4427
4429
|
this.serviceIcon = serviceIcon;
|
|
4428
4430
|
this.serviceColor = serviceColor;
|
|
4429
|
-
this.isDevelopment =
|
|
4431
|
+
this.isDevelopment = false;
|
|
4430
4432
|
}
|
|
4431
4433
|
getTimeStamp() {
|
|
4432
4434
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -5203,6 +5205,7 @@ function defaultHostSidebarPreferences() {
|
|
|
5203
5205
|
statusColorScheme: "accent",
|
|
5204
5206
|
openOnDoubleClick: false,
|
|
5205
5207
|
showFolderPaths: true,
|
|
5208
|
+
stripedRows: true,
|
|
5206
5209
|
hostClickBehavior: "newTab",
|
|
5207
5210
|
closeOnOpen: false,
|
|
5208
5211
|
barActions: {},
|
|
@@ -5271,6 +5274,7 @@ function sanitizeHostSidebarPreferences(input) {
|
|
|
5271
5274
|
) ? displayObj.statusColorScheme : defaults2.display.statusColorScheme,
|
|
5272
5275
|
openOnDoubleClick: typeof displayObj.openOnDoubleClick === "boolean" ? displayObj.openOnDoubleClick : defaults2.display.openOnDoubleClick,
|
|
5273
5276
|
showFolderPaths: typeof displayObj.showFolderPaths === "boolean" ? displayObj.showFolderPaths : defaults2.display.showFolderPaths,
|
|
5277
|
+
stripedRows: typeof displayObj.stripedRows === "boolean" ? displayObj.stripedRows : defaults2.display.stripedRows,
|
|
5274
5278
|
hostClickBehavior: HOST_CLICK_BEHAVIORS.includes(
|
|
5275
5279
|
displayObj.hostClickBehavior
|
|
5276
5280
|
) ? displayObj.hostClickBehavior : defaults2.display.hostClickBehavior,
|
|
@@ -6316,7 +6320,7 @@ async function updateRole(roleId, roleData) {
|
|
|
6316
6320
|
try {
|
|
6317
6321
|
const response = await rbacApi.put(`/rbac/roles/${roleId}`, roleData);
|
|
6318
6322
|
if (roleData.permissions) {
|
|
6319
|
-
const { notifyPermissionsChanged } = await import("./use-permissions-
|
|
6323
|
+
const { notifyPermissionsChanged } = await import("./use-permissions-EWRI3WLT.js");
|
|
6320
6324
|
notifyPermissionsChanged();
|
|
6321
6325
|
}
|
|
6322
6326
|
return response.data;
|
|
@@ -6402,9 +6406,11 @@ async function getFolderAccess(folder) {
|
|
|
6402
6406
|
throw handleApiError(error, "get folder access");
|
|
6403
6407
|
}
|
|
6404
6408
|
}
|
|
6405
|
-
async function revokeFolderAccess(ruleId) {
|
|
6409
|
+
async function revokeFolderAccess(ruleId, options = {}) {
|
|
6406
6410
|
try {
|
|
6407
|
-
await rbacApi.delete(`/rbac/folder/access/${ruleId}
|
|
6411
|
+
await rbacApi.delete(`/rbac/folder/access/${ruleId}`, {
|
|
6412
|
+
params: options.fromHosts ? { fromHosts: "true" } : void 0
|
|
6413
|
+
});
|
|
6408
6414
|
} catch (error) {
|
|
6409
6415
|
throw handleApiError(error, "revoke folder access");
|
|
6410
6416
|
}
|
|
@@ -6477,6 +6483,29 @@ async function getHostAuthOverride(hostId, protocol, sharedCopySyncId) {
|
|
|
6477
6483
|
throw handleApiError(error, "fetch host authentication override");
|
|
6478
6484
|
}
|
|
6479
6485
|
}
|
|
6486
|
+
async function getFolderAuthOverride(folder, protocol, sharedCopySyncId) {
|
|
6487
|
+
try {
|
|
6488
|
+
const target = await getSharedCopyTarget(0, sharedCopySyncId);
|
|
6489
|
+
const response = await target.api.get(`/rbac/folder-auth/${protocol}`, {
|
|
6490
|
+
params: { folder }
|
|
6491
|
+
});
|
|
6492
|
+
return response.data;
|
|
6493
|
+
} catch (error) {
|
|
6494
|
+
throw handleApiError(error, "fetch folder authentication override");
|
|
6495
|
+
}
|
|
6496
|
+
}
|
|
6497
|
+
async function setFolderAuthOverride(folder, protocol, credentialId, sharedCopySyncId) {
|
|
6498
|
+
try {
|
|
6499
|
+
const target = await getSharedCopyTarget(0, sharedCopySyncId);
|
|
6500
|
+
const response = await target.api.put(`/rbac/folder-auth/${protocol}`, {
|
|
6501
|
+
folder,
|
|
6502
|
+
credentialId
|
|
6503
|
+
});
|
|
6504
|
+
return response.data;
|
|
6505
|
+
} catch (error) {
|
|
6506
|
+
throw handleApiError(error, "update folder authentication override");
|
|
6507
|
+
}
|
|
6508
|
+
}
|
|
6480
6509
|
async function setHostAuthOverride(hostId, protocol, credentialId, sharedCopySyncId) {
|
|
6481
6510
|
try {
|
|
6482
6511
|
const target = await getSharedCopyTarget(hostId, sharedCopySyncId);
|
|
@@ -6703,7 +6732,7 @@ function createApiInstance(baseURL, serviceName = "API") {
|
|
|
6703
6732
|
operation: "request_start"
|
|
6704
6733
|
};
|
|
6705
6734
|
const logger = getLoggerForService(serviceName);
|
|
6706
|
-
const isDevMode =
|
|
6735
|
+
const isDevMode = false;
|
|
6707
6736
|
if (isDevMode) {
|
|
6708
6737
|
logger.requestStart(method, fullUrl, context);
|
|
6709
6738
|
}
|
|
@@ -6776,7 +6805,7 @@ function createApiInstance(baseURL, serviceName = "API") {
|
|
|
6776
6805
|
operation: "request_success"
|
|
6777
6806
|
};
|
|
6778
6807
|
const logger = getLoggerForService(serviceName);
|
|
6779
|
-
if (
|
|
6808
|
+
if (false) {
|
|
6780
6809
|
logger.requestSuccess(
|
|
6781
6810
|
method,
|
|
6782
6811
|
fullUrl,
|
|
@@ -6814,7 +6843,7 @@ function createApiInstance(baseURL, serviceName = "API") {
|
|
|
6814
6843
|
};
|
|
6815
6844
|
const logger = getLoggerForService(serviceName);
|
|
6816
6845
|
const isSilentRetry = !!error.config?.__silentRetry;
|
|
6817
|
-
if (
|
|
6846
|
+
if (false) {
|
|
6818
6847
|
if (status === 401) {
|
|
6819
6848
|
logger.authError(method, fullUrl, context);
|
|
6820
6849
|
} else if (status === 0 || !status) {
|
|
@@ -6868,7 +6897,7 @@ function isDev() {
|
|
|
6868
6897
|
if (isElectron()) {
|
|
6869
6898
|
return false;
|
|
6870
6899
|
}
|
|
6871
|
-
return
|
|
6900
|
+
return false;
|
|
6872
6901
|
}
|
|
6873
6902
|
var apiHost = define_import_meta_env_default.VITE_API_HOST || (typeof window !== "undefined" ? window.location.hostname : "localhost");
|
|
6874
6903
|
function getBackendUrl(path) {
|
|
@@ -6898,7 +6927,7 @@ function createRemoteOriginApiInstance(path) {
|
|
|
6898
6927
|
});
|
|
6899
6928
|
instance.interceptors.request.use(
|
|
6900
6929
|
async (config) => {
|
|
6901
|
-
const { getLinkedSession: getLinkedSession2 } = await import("./linked-server-
|
|
6930
|
+
const { getLinkedSession: getLinkedSession2 } = await import("./linked-server-J5G457OA.js");
|
|
6902
6931
|
const linked = await getLinkedSession2();
|
|
6903
6932
|
config.baseURL = linked ? `${linked.serverUrl}${path}` : "http://no-server-configured";
|
|
6904
6933
|
if (config.headers.set) {
|
|
@@ -7453,6 +7482,8 @@ export {
|
|
|
7453
7482
|
getSharedHosts,
|
|
7454
7483
|
revokeHostAccess,
|
|
7455
7484
|
getHostAuthOverride,
|
|
7485
|
+
getFolderAuthOverride,
|
|
7486
|
+
setFolderAuthOverride,
|
|
7456
7487
|
setHostAuthOverride,
|
|
7457
7488
|
shareCredential,
|
|
7458
7489
|
getCredentialAccess,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const __termixNoGlob = () => ({});
|
|
2
2
|
import {
|
|
3
|
-
Button
|
|
3
|
+
Button
|
|
4
|
+
} from "./chunk-7J4QNGFM.js";
|
|
5
|
+
import {
|
|
4
6
|
ChevronRight,
|
|
5
7
|
PANEL,
|
|
6
8
|
Plus,
|
|
@@ -8,10 +10,10 @@ import {
|
|
|
8
10
|
cn,
|
|
9
11
|
gridSizeStyle,
|
|
10
12
|
useAreaPreferences
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VKNGNEF3.js";
|
|
12
14
|
import {
|
|
13
15
|
isElectron
|
|
14
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-P26QKKU5.js";
|
|
15
17
|
import {
|
|
16
18
|
__commonJS,
|
|
17
19
|
__toESM,
|
|
@@ -2181,6 +2183,13 @@ function EmptyState({
|
|
|
2181
2183
|
// src/ui/components/data-view.tsx
|
|
2182
2184
|
init_define_import_meta_env();
|
|
2183
2185
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
2186
|
+
function listColumnTemplates(columns) {
|
|
2187
|
+
return {
|
|
2188
|
+
base: columns.filter((column) => column.hideBelow === void 0).map((column) => column.width).join(" ") || "none",
|
|
2189
|
+
md: columns.filter((column) => column.hideBelow !== "lg").map((column) => column.width).join(" ") || "none",
|
|
2190
|
+
lg: columns.map((column) => column.width).join(" ") || "none"
|
|
2191
|
+
};
|
|
2192
|
+
}
|
|
2184
2193
|
var COLS = {
|
|
2185
2194
|
1: "grid-cols-1",
|
|
2186
2195
|
2: "grid-cols-2",
|
|
@@ -2205,6 +2214,7 @@ var XL_COLS = {
|
|
|
2205
2214
|
3: "xl:grid-cols-3",
|
|
2206
2215
|
4: "xl:grid-cols-4"
|
|
2207
2216
|
};
|
|
2217
|
+
var LIST_GRID_CLASS = "grid grid-cols-[var(--data-view-cols)] @min-[48rem]:grid-cols-[var(--data-view-cols-md)] @min-[64rem]:grid-cols-[var(--data-view-cols-lg)] gap-x-2 px-3";
|
|
2208
2218
|
function gridClass(columns) {
|
|
2209
2219
|
return cn(
|
|
2210
2220
|
COLS[columns.base ?? 1],
|
|
@@ -2213,6 +2223,11 @@ function gridClass(columns) {
|
|
|
2213
2223
|
columns.xl && XL_COLS[columns.xl]
|
|
2214
2224
|
);
|
|
2215
2225
|
}
|
|
2226
|
+
function columnVisibility(hideBelow) {
|
|
2227
|
+
if (hideBelow === "md") return "hidden @min-[48rem]:block";
|
|
2228
|
+
if (hideBelow === "lg") return "hidden @min-[64rem]:block";
|
|
2229
|
+
return "";
|
|
2230
|
+
}
|
|
2216
2231
|
function DataView({
|
|
2217
2232
|
items,
|
|
2218
2233
|
view,
|
|
@@ -2246,60 +2261,72 @@ function DataView({
|
|
|
2246
2261
|
}
|
|
2247
2262
|
);
|
|
2248
2263
|
}
|
|
2249
|
-
const
|
|
2250
|
-
const rowHeight = density === "compact" ? "h-7" : "h-9";
|
|
2251
|
-
return /* @__PURE__ */ jsxs2(
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2264
|
+
const templates = listColumnTemplates(listColumns);
|
|
2265
|
+
const rowHeight = density === "compact" ? "min-h-7" : "min-h-9";
|
|
2266
|
+
return /* @__PURE__ */ jsxs2(
|
|
2267
|
+
"div",
|
|
2268
|
+
{
|
|
2269
|
+
className: cn("@container border border-border bg-card", className),
|
|
2270
|
+
style: {
|
|
2271
|
+
"--data-view-cols": templates.base,
|
|
2272
|
+
"--data-view-cols-md": templates.md,
|
|
2273
|
+
"--data-view-cols-lg": templates.lg
|
|
2274
|
+
},
|
|
2275
|
+
role: "table",
|
|
2276
|
+
children: [
|
|
2277
|
+
/* @__PURE__ */ jsx3(
|
|
2278
|
+
"div",
|
|
2259
2279
|
{
|
|
2260
2280
|
className: cn(
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
column.hideBelow === "md" && "hidden md:block",
|
|
2264
|
-
column.hideBelow === "lg" && "hidden lg:block"
|
|
2281
|
+
LIST_GRID_CLASS,
|
|
2282
|
+
"sticky top-0 z-10 items-center border-b border-border bg-card text-[10px] font-semibold uppercase tracking-widest text-muted-foreground"
|
|
2265
2283
|
),
|
|
2266
|
-
children: column
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
),
|
|
2284
|
-
style: { gridTemplateColumns: template },
|
|
2285
|
-
children: listColumns.map((column) => /* @__PURE__ */ jsx3(
|
|
2284
|
+
children: listColumns.map((column) => /* @__PURE__ */ jsx3(
|
|
2285
|
+
"span",
|
|
2286
|
+
{
|
|
2287
|
+
className: cn(
|
|
2288
|
+
"truncate py-2",
|
|
2289
|
+
column.align === "end" && "text-right",
|
|
2290
|
+
columnVisibility(column.hideBelow)
|
|
2291
|
+
),
|
|
2292
|
+
children: column.header
|
|
2293
|
+
},
|
|
2294
|
+
column.key
|
|
2295
|
+
))
|
|
2296
|
+
}
|
|
2297
|
+
),
|
|
2298
|
+
/* @__PURE__ */ jsx3("div", { children: items.map((item) => {
|
|
2299
|
+
const active = isRowActive?.(item) ?? false;
|
|
2300
|
+
return /* @__PURE__ */ jsx3(
|
|
2286
2301
|
"div",
|
|
2287
2302
|
{
|
|
2303
|
+
onClick: onRowClick ? () => onRowClick(item) : void 0,
|
|
2288
2304
|
className: cn(
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2305
|
+
LIST_GRID_CLASS,
|
|
2306
|
+
"items-center border-b border-border/50 text-xs transition-colors last:border-0",
|
|
2307
|
+
rowHeight,
|
|
2308
|
+
onRowClick && "cursor-pointer",
|
|
2309
|
+
active ? "bg-accent-brand/10" : "hover:bg-muted/40"
|
|
2293
2310
|
),
|
|
2294
|
-
children:
|
|
2311
|
+
children: listColumns.map((column) => /* @__PURE__ */ jsx3(
|
|
2312
|
+
"div",
|
|
2313
|
+
{
|
|
2314
|
+
className: cn(
|
|
2315
|
+
"min-w-0 truncate",
|
|
2316
|
+
column.align === "end" && "text-right",
|
|
2317
|
+
columnVisibility(column.hideBelow)
|
|
2318
|
+
),
|
|
2319
|
+
children: column.cell(item)
|
|
2320
|
+
},
|
|
2321
|
+
column.key
|
|
2322
|
+
))
|
|
2295
2323
|
},
|
|
2296
|
-
|
|
2297
|
-
)
|
|
2298
|
-
}
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
] });
|
|
2324
|
+
getKey(item)
|
|
2325
|
+
);
|
|
2326
|
+
}) })
|
|
2327
|
+
]
|
|
2328
|
+
}
|
|
2329
|
+
);
|
|
2303
2330
|
}
|
|
2304
2331
|
|
|
2305
2332
|
// src/ui/lib/issue-url.ts
|
|
@@ -2486,6 +2513,7 @@ function pluginStatus(summary) {
|
|
|
2486
2513
|
if (summary.state === "failed") return "failed";
|
|
2487
2514
|
if (summary.state === "blocked") return "blocked";
|
|
2488
2515
|
if (!summary.enabled) return "disabled";
|
|
2516
|
+
if (summary.state === "safe-mode") return "safeMode";
|
|
2489
2517
|
return "running";
|
|
2490
2518
|
}
|
|
2491
2519
|
function mergePlugins(installed, registry) {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const __termixNoGlob = () => ({});
|
|
2
|
+
import {
|
|
3
|
+
useTheme
|
|
4
|
+
} from "./chunk-HQ6NNFSX.js";
|
|
5
|
+
import {
|
|
6
|
+
init_define_import_meta_env
|
|
7
|
+
} from "./chunk-YGYBM7SQ.js";
|
|
8
|
+
|
|
9
|
+
// src/ui/components/sonner.tsx
|
|
10
|
+
init_define_import_meta_env();
|
|
11
|
+
import { Toaster as Sonner } from "sonner";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
var Toaster = ({ ...props }) => {
|
|
14
|
+
const { theme = "system" } = useTheme();
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
Sonner,
|
|
17
|
+
{
|
|
18
|
+
theme,
|
|
19
|
+
className: "toaster group",
|
|
20
|
+
toastOptions: {
|
|
21
|
+
classNames: {
|
|
22
|
+
toast: "group toast group-[.toaster]:bg-card group-[.toaster]:text-card-foreground group-[.toaster]:border-border group-[.toaster]:rounded-none! group-[.toaster]:shadow-lg group-[.toaster]:font-mono",
|
|
23
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
24
|
+
actionButton: "group-[.toast]:bg-accent-brand group-[.toast]:text-white group-[.toast]:font-semibold",
|
|
25
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
26
|
+
success: "group-[.toast]:!text-accent-brand group-[.toast]:!border-accent-brand/30",
|
|
27
|
+
info: "group-[.toast]:!text-accent-brand group-[.toast]:!border-accent-brand/30",
|
|
28
|
+
error: "group-[.toast]:!text-destructive group-[.toast]:!border-destructive/30"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
style: {
|
|
32
|
+
"--radius": "0px",
|
|
33
|
+
"--normal-bg": "var(--card)",
|
|
34
|
+
"--normal-border": "var(--border)",
|
|
35
|
+
"--normal-text": "var(--card-foreground)",
|
|
36
|
+
"--success-bg": "var(--card)",
|
|
37
|
+
"--success-border": "var(--border)",
|
|
38
|
+
"--success-text": "var(--color-accent-brand)",
|
|
39
|
+
"--info-bg": "var(--card)",
|
|
40
|
+
"--info-border": "var(--border)",
|
|
41
|
+
"--info-text": "var(--color-accent-brand)",
|
|
42
|
+
"--error-bg": "var(--card)",
|
|
43
|
+
"--error-border": "var(--border)",
|
|
44
|
+
"--error-text": "var(--destructive)"
|
|
45
|
+
},
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
Toaster
|
|
53
|
+
};
|