dsh-plugin-shop 0.1.4 → 0.2.0
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/README.md +6 -6
- package/cordis.patch.yml +4 -4
- package/lib/client.js +237 -236
- package/lib/index.js +13 -13
- package/lib/typert.host.js +63 -63
- package/lib/typert.remote-client.d.ts +13 -13
- package/lib/typert.remote-client.js +41 -41
- package/lib/types/client/{StoreTab.d.ts → ShopTab.d.ts} +11 -11
- package/lib/types/client/index.d.ts +12 -12
- package/lib/types/client/locales.d.ts +3 -3
- package/lib/types/client/present.d.ts +12 -11
- package/lib/types/client/useInstall.d.ts +3 -3
- package/lib/types/host/executor.d.ts +1 -1
- package/lib/types/host/index.d.ts +22 -22
- package/lib/types/host/types.d.ts +1 -1
- package/lib/types/index.d.ts +2 -2
- package/package.json +3 -3
package/lib/client.js
CHANGED
|
@@ -4093,12 +4093,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4093
4093
|
}
|
|
4094
4094
|
//#endregion
|
|
4095
4095
|
//#region lib/typert.remote-client.js
|
|
4096
|
-
const
|
|
4096
|
+
const dsh_plugin_shop_shop_catalog_parameter_0$schema = union([_undefined(), object({ "refresh": union([
|
|
4097
4097
|
_undefined(),
|
|
4098
4098
|
literal(false),
|
|
4099
4099
|
literal(true)
|
|
4100
4100
|
]).optional() })]);
|
|
4101
|
-
const
|
|
4101
|
+
const dsh_plugin_shop_shop_catalog_result$schema = object({
|
|
4102
4102
|
"schemaVersion": number(),
|
|
4103
4103
|
"builtAt": string(),
|
|
4104
4104
|
"stale": boolean(),
|
|
@@ -4142,7 +4142,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4142
4142
|
"detail": string()
|
|
4143
4143
|
}))
|
|
4144
4144
|
});
|
|
4145
|
-
const
|
|
4145
|
+
const dsh_plugin_shop_shop_installStart_parameter_0$schema = object({
|
|
4146
4146
|
"name": string(),
|
|
4147
4147
|
"version": string(),
|
|
4148
4148
|
"acknowledged": union([
|
|
@@ -4151,7 +4151,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4151
4151
|
literal(true)
|
|
4152
4152
|
]).optional()
|
|
4153
4153
|
});
|
|
4154
|
-
const
|
|
4154
|
+
const dsh_plugin_shop_shop_installStart_result$schema = union([object({
|
|
4155
4155
|
"ok": literal(true),
|
|
4156
4156
|
"installId": string()
|
|
4157
4157
|
}), object({
|
|
@@ -4164,8 +4164,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4164
4164
|
]),
|
|
4165
4165
|
"detail": string()
|
|
4166
4166
|
})]);
|
|
4167
|
-
const
|
|
4168
|
-
const
|
|
4167
|
+
const dsh_plugin_shop_shop_installStatus_parameter_0$schema = object({ "installId": string() });
|
|
4168
|
+
const dsh_plugin_shop_shop_installStatus_result$schema = object({
|
|
4169
4169
|
"found": boolean(),
|
|
4170
4170
|
"state": union([
|
|
4171
4171
|
literal("running"),
|
|
@@ -4180,16 +4180,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4180
4180
|
]).optional(),
|
|
4181
4181
|
"detail": union([_undefined(), string()]).optional()
|
|
4182
4182
|
});
|
|
4183
|
-
const
|
|
4183
|
+
const dsh_plugin_shop_shop_outdated_result$schema = array(object({
|
|
4184
4184
|
"name": string(),
|
|
4185
4185
|
"installed": string(),
|
|
4186
4186
|
"latest": string()
|
|
4187
4187
|
}));
|
|
4188
|
-
const
|
|
4188
|
+
const dsh_plugin_shop_shop_setEnabled_parameter_0$schema = object({
|
|
4189
4189
|
"name": string(),
|
|
4190
4190
|
"enabled": boolean()
|
|
4191
4191
|
});
|
|
4192
|
-
const
|
|
4192
|
+
const dsh_plugin_shop_shop_setEnabled_result$schema = object({
|
|
4193
4193
|
"ok": boolean(),
|
|
4194
4194
|
"detail": union([_undefined(), string()]).optional()
|
|
4195
4195
|
});
|
|
@@ -4197,9 +4197,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4197
4197
|
package: "dsh-plugin-shop",
|
|
4198
4198
|
descriptors: [
|
|
4199
4199
|
{
|
|
4200
|
-
id: "dsh-plugin-shop#
|
|
4201
|
-
service: "
|
|
4202
|
-
namespace: "
|
|
4200
|
+
id: "dsh-plugin-shop#shop/catalog",
|
|
4201
|
+
service: "shop",
|
|
4202
|
+
namespace: "shop",
|
|
4203
4203
|
method: "catalog",
|
|
4204
4204
|
invocation: { kind: "direct" },
|
|
4205
4205
|
parameters: [{
|
|
@@ -4209,14 +4209,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4209
4209
|
acceptsUndefined: true,
|
|
4210
4210
|
codec: {
|
|
4211
4211
|
mode: "strict",
|
|
4212
|
-
typeSymbol: "dsh-plugin-shop#
|
|
4213
|
-
schema:
|
|
4212
|
+
typeSymbol: "dsh-plugin-shop#shop/catalog:args",
|
|
4213
|
+
schema: dsh_plugin_shop_shop_catalog_parameter_0$schema
|
|
4214
4214
|
}
|
|
4215
4215
|
}],
|
|
4216
4216
|
result: {
|
|
4217
4217
|
mode: "strict",
|
|
4218
|
-
typeSymbol: "dsh-plugin-shop/types#
|
|
4219
|
-
schema:
|
|
4218
|
+
typeSymbol: "dsh-plugin-shop/types#ShopCatalogResult",
|
|
4219
|
+
schema: dsh_plugin_shop_shop_catalog_result$schema
|
|
4220
4220
|
},
|
|
4221
4221
|
sourceLocation: {
|
|
4222
4222
|
"file": "packages/dsh-plugin-shop/src/host/index.ts",
|
|
@@ -4225,9 +4225,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4225
4225
|
}
|
|
4226
4226
|
},
|
|
4227
4227
|
{
|
|
4228
|
-
id: "dsh-plugin-shop#
|
|
4229
|
-
service: "
|
|
4230
|
-
namespace: "
|
|
4228
|
+
id: "dsh-plugin-shop#shop/installStart",
|
|
4229
|
+
service: "shop",
|
|
4230
|
+
namespace: "shop",
|
|
4231
4231
|
method: "installStart",
|
|
4232
4232
|
implementation: "install",
|
|
4233
4233
|
invocation: { kind: "direct" },
|
|
@@ -4238,13 +4238,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4238
4238
|
codec: {
|
|
4239
4239
|
mode: "strict",
|
|
4240
4240
|
typeSymbol: "dsh-plugin-shop/types#InstallArgs",
|
|
4241
|
-
schema:
|
|
4241
|
+
schema: dsh_plugin_shop_shop_installStart_parameter_0$schema
|
|
4242
4242
|
}
|
|
4243
4243
|
}],
|
|
4244
4244
|
result: {
|
|
4245
4245
|
mode: "strict",
|
|
4246
|
-
typeSymbol: "dsh-plugin-shop/types#
|
|
4247
|
-
schema:
|
|
4246
|
+
typeSymbol: "dsh-plugin-shop/types#ShopInstallResult",
|
|
4247
|
+
schema: dsh_plugin_shop_shop_installStart_result$schema
|
|
4248
4248
|
},
|
|
4249
4249
|
sourceLocation: {
|
|
4250
4250
|
"file": "packages/dsh-plugin-shop/src/host/index.ts",
|
|
@@ -4253,9 +4253,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4253
4253
|
}
|
|
4254
4254
|
},
|
|
4255
4255
|
{
|
|
4256
|
-
id: "dsh-plugin-shop#
|
|
4257
|
-
service: "
|
|
4258
|
-
namespace: "
|
|
4256
|
+
id: "dsh-plugin-shop#shop/installStatus",
|
|
4257
|
+
service: "shop",
|
|
4258
|
+
namespace: "shop",
|
|
4259
4259
|
method: "installStatus",
|
|
4260
4260
|
invocation: { kind: "direct" },
|
|
4261
4261
|
parameters: [{
|
|
@@ -4264,14 +4264,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4264
4264
|
source: "json",
|
|
4265
4265
|
codec: {
|
|
4266
4266
|
mode: "strict",
|
|
4267
|
-
typeSymbol: "dsh-plugin-shop#
|
|
4268
|
-
schema:
|
|
4267
|
+
typeSymbol: "dsh-plugin-shop#shop/installStatus:args",
|
|
4268
|
+
schema: dsh_plugin_shop_shop_installStatus_parameter_0$schema
|
|
4269
4269
|
}
|
|
4270
4270
|
}],
|
|
4271
4271
|
result: {
|
|
4272
4272
|
mode: "strict",
|
|
4273
|
-
typeSymbol: "dsh-plugin-shop/types#
|
|
4274
|
-
schema:
|
|
4273
|
+
typeSymbol: "dsh-plugin-shop/types#ShopInstallStatusResult",
|
|
4274
|
+
schema: dsh_plugin_shop_shop_installStatus_result$schema
|
|
4275
4275
|
},
|
|
4276
4276
|
sourceLocation: {
|
|
4277
4277
|
"file": "packages/dsh-plugin-shop/src/host/index.ts",
|
|
@@ -4280,16 +4280,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4280
4280
|
}
|
|
4281
4281
|
},
|
|
4282
4282
|
{
|
|
4283
|
-
id: "dsh-plugin-shop#
|
|
4284
|
-
service: "
|
|
4285
|
-
namespace: "
|
|
4283
|
+
id: "dsh-plugin-shop#shop/outdated",
|
|
4284
|
+
service: "shop",
|
|
4285
|
+
namespace: "shop",
|
|
4286
4286
|
method: "outdated",
|
|
4287
4287
|
invocation: { kind: "direct" },
|
|
4288
4288
|
parameters: [],
|
|
4289
4289
|
result: {
|
|
4290
4290
|
mode: "strict",
|
|
4291
|
-
typeSymbol: "dsh-plugin-shop#
|
|
4292
|
-
schema:
|
|
4291
|
+
typeSymbol: "dsh-plugin-shop#shop/outdated:result",
|
|
4292
|
+
schema: dsh_plugin_shop_shop_outdated_result$schema
|
|
4293
4293
|
},
|
|
4294
4294
|
sourceLocation: {
|
|
4295
4295
|
"file": "packages/dsh-plugin-shop/src/host/index.ts",
|
|
@@ -4298,9 +4298,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4298
4298
|
}
|
|
4299
4299
|
},
|
|
4300
4300
|
{
|
|
4301
|
-
id: "dsh-plugin-shop#
|
|
4302
|
-
service: "
|
|
4303
|
-
namespace: "
|
|
4301
|
+
id: "dsh-plugin-shop#shop/setEnabled",
|
|
4302
|
+
service: "shop",
|
|
4303
|
+
namespace: "shop",
|
|
4304
4304
|
method: "setEnabled",
|
|
4305
4305
|
invocation: { kind: "direct" },
|
|
4306
4306
|
parameters: [{
|
|
@@ -4309,14 +4309,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4309
4309
|
source: "json",
|
|
4310
4310
|
codec: {
|
|
4311
4311
|
mode: "strict",
|
|
4312
|
-
typeSymbol: "dsh-plugin-shop#
|
|
4313
|
-
schema:
|
|
4312
|
+
typeSymbol: "dsh-plugin-shop#shop/setEnabled:args",
|
|
4313
|
+
schema: dsh_plugin_shop_shop_setEnabled_parameter_0$schema
|
|
4314
4314
|
}
|
|
4315
4315
|
}],
|
|
4316
4316
|
result: {
|
|
4317
4317
|
mode: "strict",
|
|
4318
|
-
typeSymbol: "dsh-plugin-shop/types#
|
|
4319
|
-
schema:
|
|
4318
|
+
typeSymbol: "dsh-plugin-shop/types#ShopSetEnabledResult",
|
|
4319
|
+
schema: dsh_plugin_shop_shop_setEnabled_result$schema
|
|
4320
4320
|
},
|
|
4321
4321
|
sourceLocation: {
|
|
4322
4322
|
"file": "packages/dsh-plugin-shop/src/host/index.ts",
|
|
@@ -4336,7 +4336,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4336
4336
|
case "community": return "tierCommunity";
|
|
4337
4337
|
}
|
|
4338
4338
|
}
|
|
4339
|
-
/** A derived listing has no author-declared catalog section; the
|
|
4339
|
+
/** A derived listing has no author-declared catalog section; the shop
|
|
4340
4340
|
* presents it as unclaimed, which is the signal that prompts an author to add
|
|
4341
4341
|
* one (§6.1). Never present a derived entry as though the author wrote it. */
|
|
4342
4342
|
function isUnclaimed(entry) {
|
|
@@ -4399,7 +4399,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4399
4399
|
}
|
|
4400
4400
|
}
|
|
4401
4401
|
}
|
|
4402
|
-
const
|
|
4402
|
+
const SHOP_KEYWORDS = [
|
|
4403
4403
|
"store",
|
|
4404
4404
|
"market",
|
|
4405
4405
|
"mall",
|
|
@@ -4407,21 +4407,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4407
4407
|
"marketplace"
|
|
4408
4408
|
];
|
|
4409
4409
|
/**
|
|
4410
|
-
* Whether a package name reads as a plugin
|
|
4411
|
-
* plugins, e.g. `dsh-plugin-shop`, `dsh-store`, `pluginstore`). The
|
|
4410
|
+
* Whether a package name reads as a plugin shop (a marketplace for dsh
|
|
4411
|
+
* plugins, e.g. `dsh-plugin-shop`, `dsh-store`, `pluginstore`). The shop
|
|
4412
4412
|
* tab hides these so the market does not list competing markets.
|
|
4413
4413
|
*
|
|
4414
4414
|
* Precision over recall: a name merely CONTAINING a keyword segment without
|
|
4415
4415
|
* a plugin qualifier or a keyword ending (`market-data-provider`,
|
|
4416
|
-
* `marketplace-hub`) is NOT a
|
|
4417
|
-
* match on the substring "store".
|
|
4416
|
+
* `marketplace-hub`) is NOT a shop plugin, and `dsh-restore` must never
|
|
4417
|
+
* match on the substring "store". The keyword list keeps "store" on purpose:
|
|
4418
|
+
* it matches other people's package names, not ours.
|
|
4418
4419
|
*/
|
|
4419
|
-
function
|
|
4420
|
+
function isShopLike(name) {
|
|
4420
4421
|
const segments = name.toLowerCase().split(/[-_.]+/);
|
|
4421
4422
|
const hasPlugin = segments.includes("plugin");
|
|
4422
4423
|
if (segments.some((segment) => /plugin(store|market|mall|shop|marketplace)/.test(segment) || /(store|market|mall|shop|marketplace)plugin/.test(segment))) return true;
|
|
4423
|
-
if (segments.filter((segment) =>
|
|
4424
|
-
return hasPlugin ||
|
|
4424
|
+
if (segments.filter((segment) => SHOP_KEYWORDS.includes(segment)).length === 0) return false;
|
|
4425
|
+
return hasPlugin || SHOP_KEYWORDS.includes(segments.at(-1));
|
|
4425
4426
|
}
|
|
4426
4427
|
const CATEGORY_KEYS = {
|
|
4427
4428
|
tool: "categoryTool",
|
|
@@ -4438,10 +4439,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4438
4439
|
}
|
|
4439
4440
|
//#endregion
|
|
4440
4441
|
//#region src/client/locales.ts
|
|
4441
|
-
/** Copy dictionaries for the
|
|
4442
|
+
/** Copy dictionaries for the shop Settings tab. */
|
|
4442
4443
|
/** Simplified Chinese dictionary and key source of truth. */
|
|
4443
4444
|
const zh = {
|
|
4444
|
-
tab: "
|
|
4445
|
+
tab: "插件商店",
|
|
4445
4446
|
loading: "正在读取目录…",
|
|
4446
4447
|
error: "暂时无法读取目录。",
|
|
4447
4448
|
retry: "重试",
|
|
@@ -4491,7 +4492,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4491
4492
|
};
|
|
4492
4493
|
/** English dictionary checked against the Chinese key set. */
|
|
4493
4494
|
const en = {
|
|
4494
|
-
tab: "Plugin
|
|
4495
|
+
tab: "Plugin shop",
|
|
4495
4496
|
loading: "Reading the catalog…",
|
|
4496
4497
|
error: "The catalog is temporarily unavailable.",
|
|
4497
4498
|
retry: "Retry",
|
|
@@ -4591,87 +4592,87 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4591
4592
|
};
|
|
4592
4593
|
}
|
|
4593
4594
|
//#endregion
|
|
4594
|
-
//#region \0dsh-plugin-shop-css:
|
|
4595
|
-
const css = "/* Store tab styles — a market shelf inside the settings surface. The visual\n * language is the dsh theme's alias tokens ONLY (the four tokens the previous\n * styles referenced that do not exist — bg-layer-3, interactive-bg-hover,\n * state-error, state-success — are corrected to bg-layer-2 and the\n * state-*-primary set). The signature is the category spine: one brand hue\n * at six opacities, one per category, with the category name as the cover\n * label. Class names are mapped to content-derived names at bundle time\n * (tsdown.sc0638f_client.s5f77d3_config.s9c91c3_ts) and stubbed in tests; only the keys are relied\n * on.\n *\n * One token rule the theme forces: the background LAYERS do not carry\n * contrast. In the light theme bg-base, bg-layer-1, bg-layer-2 and\n * bg-layer-3 all resolve to the same white; only the dark theme spreads them\n * (950/875/850/800). So a layer-2 fill on a layer-1 ground is invisible for\n * half of all users, and anything whose fill is its ONLY affordance — the\n * loading skeleton, the borderless capability chips — derives its fill from\n * label-primary instead, which inverts with the theme by construction.\n * Elements that also carry a border or text may keep a layer fill.\n * `css-tokens.sc0638f_client.s456164_spec.s9c91c3_ts` pins this. */\n\n.s3ee4f7_panel {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n.s34fbb8_stateLine {\n margin: 0;\n color: var(--dsw-alias-label-primary);\n font-size: 13px;\n}\n\n/* Visually hidden but screen-reader readable (the loading copy while the\n * skeleton stands in visually). */\n.sf8980c_srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n overflow: hidden;\n white-space: nowrap;\n}\n\n/* The loading shelf: ghost cards with the same geometry as the real grid, so\n * the swap to content is a same-shape handoff instead of a jump. */\n.s7cc50d_skeletonGrid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n gap: 12px;\n}\n\n.sc1d9dd_skeletonCard {\n position: relative;\n display: flex;\n flex-direction: column;\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 10px;\n background: var(--dsw-alias-bg-layer-1);\n overflow: hidden;\n}\n\n/* The shimmer sweep: one gradient band travels across each ghost card while\n * the bars breathe, so the loading state reads as \"the shelf is scanning\". */\n.sc1d9dd_skeletonCard::after {\n content: '';\n position: absolute;\n inset: 0;\n background: linear-gradient(\n 100deg,\n transparent 25%,\n color-mix(in srgb, var(--dsw-alias-label-primary) 14%, transparent) 50%,\n transparent 75%\n );\n transform: translateX(-100%);\n animation: dshStoreSkeletonSweep 1.4s ease-in-out infinite;\n pointer-events: none;\n}\n\n@keyframes dshStoreSkeletonSweep {\n to { transform: translateX(100%); }\n}\n\n.sb9166d_skeletonCover {\n display: block;\n height: 26px;\n background: color-mix(in srgb, var(--dsw-alias-label-primary) 10%, transparent);\n}\n\n.s9f0885_skeletonName {\n width: 55%;\n height: 14px;\n margin: 12px 12px 0;\n border-radius: 4px;\n background: color-mix(in srgb, var(--dsw-alias-label-primary) 8%, transparent);\n}\n\n.s18a7d7_skeletonSummary {\n width: 92%;\n height: 12px;\n margin: 10px 12px 0;\n border-radius: 4px;\n background: color-mix(in srgb, var(--dsw-alias-label-primary) 8%, transparent);\n}\n\n.se58a1d_skeletonSummaryShort {\n width: 68%;\n height: 12px;\n margin: 6px 12px 14px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--dsw-alias-label-primary) 8%, transparent);\n}\n\n.sc1d9dd_skeletonCard span {\n animation: dshStoreSkeletonPulse 1.6s ease-in-out infinite;\n}\n\n@keyframes dshStoreSkeletonPulse {\n 0%, 100% { opacity: 0.5; }\n 50% { opacity: 1; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .sc1d9dd_skeletonCard span { animation: none; opacity: 0.75; }\n .sc1d9dd_skeletonCard::after { content: none; }\n}\n\n.sd2f7a7_actionButton {\n align-self: flex-start;\n padding: 5px 14px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n font-size: 13px;\n cursor: pointer;\n}\n\n.sd2f7a7_actionButton:hover {\n border-color: color-mix(in srgb, var(--dsw-alias-brand-primary) 45%, var(--dsw-alias-border-l2));\n color: var(--dsw-alias-brand-primary);\n}\n\n.sd2f7a7_actionButton:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n.s8b7c86_toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.s631085_searchInput {\n width: min(280px, 100%);\n padding: 6px 10px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n background: var(--dsw-alias-bg-layer-1);\n color: var(--dsw-alias-label-primary);\n font-size: 13px;\n}\n\n.s631085_searchInput:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n.sb9cba1_staleBlock {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.s8da7f6_staleBadge {\n padding: 2px 8px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 14%, transparent);\n border: 1px solid color-mix(in srgb, var(--dsw-alias-state-warn-primary) 40%, transparent);\n color: var(--dsw-alias-state-warn-primary);\n font-size: 12px;\n}\n\n.s7cf245_catalogHeading {\n margin: 2px 0 0;\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0.02em;\n color: var(--dsw-alias-label-primary);\n}\n\n.s104623_catalogStats {\n margin: -8px 0 0;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12px;\n letter-spacing: 0.02em;\n color: var(--dsw-alias-label-secondary);\n}\n\n.sc4b2b5_emptyLine {\n margin: 0;\n color: var(--dsw-alias-label-primary);\n font-size: 13px;\n}\n\n/* The shelf: a responsive grid of cards. */\n.s2b38ed_cards {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n gap: 12px;\n list-style: none;\n margin: 0;\n padding: 0;\n animation: dshStoreCardsIn 220ms ease;\n}\n\n@keyframes dshStoreCardsIn {\n from { opacity: 0; transform: translateY(3px); }\n to { opacity: 1; transform: none; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .s2b38ed_cards { animation: none; }\n}\n\n.se139f2_card {\n position: relative;\n display: flex;\n flex-direction: column;\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 10px;\n background: var(--dsw-alias-bg-layer-1);\n overflow: hidden;\n transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;\n}\n\n.se139f2_card:hover {\n border-color: color-mix(in srgb, var(--dsw-alias-brand-primary) 45%, var(--dsw-alias-border-l1));\n transform: translateY(-1px);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--dsw-alias-brand-primary) 12%, transparent);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .se139f2_card { transition: none; }\n .se139f2_card:hover { transform: none; }\n}\n\n/* The signature: a brand spine in the category's own opacity. */\n.sd7b5c1_cardSpine {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 3px;\n background: color-mix(in srgb, var(--dsw-alias-brand-primary) var(--spine-opacity, 40%), transparent);\n}\n\n.se139f2_card[data-category='tool'] { --spine-opacity: 100%; }\n.se139f2_card[data-category='provider'] { --spine-opacity: 82%; }\n.se139f2_card[data-category='ui'] { --spine-opacity: 64%; }\n.se139f2_card[data-category='workflow'] { --spine-opacity: 48%; }\n.se139f2_card[data-category='integration'] { --spine-opacity: 34%; }\n.se139f2_card[data-category='other'] { --spine-opacity: 22%; }\n\n.s3cb96a_cardCover {\n display: block;\n padding: 5px 12px 5px 12px;\n border-bottom: 1px solid var(--dsw-alias-border-l1);\n background: color-mix(in srgb, var(--dsw-alias-brand-primary) var(--spine-opacity, 40%), transparent);\n}\n\n.s756c69_coverLabel {\n display: block;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--dsw-alias-brand-primary);\n}\n\n.s715e28_entryHeader {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 8px;\n padding: 10px 12px 6px;\n border: none;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.s715e28_entryHeader:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n}\n\n/* The name owns the full header width; badges sit on their own line below. */\n.s13952b_name {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 13px;\n font-weight: 600;\n overflow-wrap: anywhere;\n color: var(--dsw-alias-label-primary);\n}\n\n.scf3634_badges {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.s564750_tierBadge {\n padding: 1px 7px;\n border-radius: 999px;\n font-size: 11px;\n line-height: 1.6;\n}\n\n.s564750_tierBadge[data-tier='verified'] {\n color: var(--dsw-alias-state-success-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 14%, transparent);\n border: 1px solid color-mix(in srgb, var(--dsw-alias-state-success-primary) 40%, transparent);\n}\n\n.s564750_tierBadge[data-tier='verified-stale'] {\n color: var(--dsw-alias-state-warn-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 14%, transparent);\n border: 1px solid color-mix(in srgb, var(--dsw-alias-state-warn-primary) 40%, transparent);\n}\n\n.s564750_tierBadge[data-tier='community'] {\n color: var(--dsw-alias-label-secondary);\n background: var(--dsw-alias-bg-layer-2);\n border: 1px solid var(--dsw-alias-border-l2);\n}\n\n.s8d8459_unclaimedBadge {\n padding: 1px 7px;\n border-radius: 999px;\n border: 1px dashed var(--dsw-alias-border-l2);\n font-size: 11px;\n line-height: 1.6;\n color: var(--dsw-alias-label-secondary);\n}\n\n.s22f9c9_chevron, .s9812b3_chevronOpen {\n color: var(--dsw-alias-label-secondary);\n transition: transform 120ms ease;\n}\n\n.s9812b3_chevronOpen { transform: rotate(180deg); }\n\n@media (prefers-reduced-motion: reduce) {\n .s22f9c9_chevron, .s9812b3_chevronOpen { transition: none; }\n}\n\n.s1630e4_body {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 0 12px 12px;\n}\n\n.s817163_summary {\n margin: 0;\n font-size: 13px;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.s7b7b74_summaryZh {\n margin: -4px 0 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.sa1cf55_capabilitiesBlock {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.sc5187f_capabilitiesNote {\n margin: 0;\n font-size: 11px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.s254ff5_capabilities {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.s254ff5_capabilities li {\n padding: 1px 6px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent);\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 11px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.sd5c609_detail {\n border-top: 1px solid var(--dsw-alias-border-l1);\n padding-top: 8px;\n}\n\n.s9f6608_detailRows {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0;\n}\n\n.s60a4c7_detailRow {\n display: flex;\n justify-content: space-between;\n gap: 12px;\n font-size: 12px;\n}\n\n.s60a4c7_detailRow dt {\n color: var(--dsw-alias-label-secondary);\n}\n\n.s60a4c7_detailRow dd {\n margin: 0;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n overflow-wrap: anywhere;\n text-align: right;\n color: var(--dsw-alias-label-primary);\n}\n\n.s27bac7_reviewedLine {\n margin: 8px 0 0;\n padding: 6px 8px;\n border-radius: 6px;\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent);\n font-size: 12px;\n color: var(--dsw-alias-state-warn-primary);\n}\n\n/* Install flow. */\n.se261d7_installPanel {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-top: 2px;\n}\n\n.sd477fc_installButton, .sf60f0d_confirmButton, .se03737_cancelButton {\n align-self: flex-start;\n padding: 5px 14px;\n border-radius: 6px;\n font-size: 13px;\n cursor: pointer;\n}\n\n.sd477fc_installButton {\n border: 1px solid var(--dsw-alias-brand-primary);\n background: var(--dsw-alias-brand-primary);\n color: var(--dsw-alias-bg-base);\n}\n\n.sd477fc_installButton:hover {\n background: color-mix(in srgb, var(--dsw-alias-brand-primary) 88%, var(--dsw-alias-label-primary));\n}\n\n.sf60f0d_confirmButton {\n border: 1px solid var(--dsw-alias-brand-primary);\n background: var(--dsw-alias-brand-primary);\n color: var(--dsw-alias-bg-base);\n}\n\n.sf60f0d_confirmButton:hover {\n background: color-mix(in srgb, var(--dsw-alias-brand-primary) 88%, var(--dsw-alias-label-primary));\n}\n\n.se03737_cancelButton {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n}\n\n.se03737_cancelButton:hover {\n border-color: var(--dsw-alias-label-secondary);\n}\n\n.sd477fc_installButton:focus-visible, .sf60f0d_confirmButton:focus-visible, .se03737_cancelButton:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n.s52e3df_gate {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 10px;\n border: 1px solid var(--dsw-alias-state-warn-primary);\n border-radius: 8px;\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 8%, transparent);\n}\n\n.s2fa7f4_gateTitle {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--dsw-alias-state-warn-primary);\n}\n\n.sa5c938_gateBody {\n margin: 0;\n font-size: 12px;\n line-height: 1.6;\n color: var(--dsw-alias-label-primary);\n}\n\n.sef3bcb_gateActions {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.s27c2b0_installing {\n margin: 0;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.sca368e_log {\n max-height: 160px;\n overflow: auto;\n margin: 0;\n padding: 8px;\n border-radius: 6px;\n background: var(--dsw-alias-bg-base);\n border: 1px solid var(--dsw-alias-border-l1);\n list-style: none;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 11px;\n line-height: 1.5;\n}\n\n.s1b9272_logLine {\n white-space: pre-wrap;\n word-break: break-all;\n color: var(--dsw-alias-label-secondary);\n}\n\n.sa67c51_notice {\n margin: 0;\n font-size: 12px;\n color: var(--dsw-alias-state-success-primary);\n}\n\n.s58085b_failedHeading {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-state-error-primary);\n}\n\n.sbead84_failedDetail {\n margin: 0;\n font-size: 12px;\n line-height: 1.6;\n color: var(--dsw-alias-label-primary);\n}\n\n.s27ed17_rejectedCode {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-state-error-primary);\n}\n\n.s42db4e_rejectedDetail {\n margin: 0;\n font-size: 12px;\n line-height: 1.6;\n color: var(--dsw-alias-label-primary);\n}\n\n/* Installed section. */\n.s69767e_outdatedSection {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-top: 6px;\n}\n\n.s2d4d0e_outdatedList {\n display: flex;\n flex-direction: column;\n gap: 8px;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.s573b74_outdatedRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n flex-wrap: wrap;\n padding: 10px 12px;\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-1);\n}\n\n.s2bb39b_outdatedInfo {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.s2bb39b_outdatedInfo strong {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 13px;\n word-break: break-all;\n color: var(--dsw-alias-label-primary);\n}\n\n.s7a2aa4_outdatedVersions {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.s74c7b2_outdatedActions {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n/* The enable/disable switch. */\n.s5a5c20_switch {\n position: relative;\n width: 32px;\n height: 18px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 999px;\n background: var(--dsw-alias-bg-layer-2);\n cursor: pointer;\n transition: background 120ms ease, border-color 120ms ease;\n}\n\n.sa963e5_switchOn {\n border-color: var(--dsw-alias-state-success-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 55%, transparent);\n}\n\n.s2e73a7_switchKnob {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 12px;\n height: 12px;\n border-radius: 999px;\n background: var(--dsw-alias-label-primary);\n transition: transform 120ms ease, background 120ms ease;\n}\n\n.sa963e5_switchOn .s2e73a7_switchKnob {\n transform: translateX(14px);\n background: var(--dsw-alias-bg-base);\n}\n\n.s5a5c20_switch:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .s5a5c20_switch, .s2e73a7_switchKnob { transition: none; }\n}\n";
|
|
4596
|
-
if (typeof document !== "undefined" && !document.querySelector("style[data-plugin-css=\"
|
|
4595
|
+
//#region \0dsh-plugin-shop-css:e3675a89
|
|
4596
|
+
const css = "/* Shop tab styles — a market shelf inside the settings surface. The visual\n * language is the dsh theme's alias tokens ONLY (the four tokens the previous\n * styles referenced that do not exist — bg-layer-3, interactive-bg-hover,\n * state-error, state-success — are corrected to bg-layer-2 and the\n * state-*-primary set). The signature is the category spine: one brand hue\n * at six opacities, one per category, with the category name as the cover\n * label. Class names are mapped to content-derived names at bundle time\n * (tsdown.s8583e3_client.s942a79_config.s5f67aa_ts) and stubbed in tests; only the keys are relied\n * on.\n *\n * One token rule the theme forces: the background LAYERS do not carry\n * contrast. In the light theme bg-base, bg-layer-1, bg-layer-2 and\n * bg-layer-3 all resolve to the same white; only the dark theme spreads them\n * (950/875/850/800). So a layer-2 fill on a layer-1 ground is invisible for\n * half of all users, and anything whose fill is its ONLY affordance — the\n * loading skeleton, the borderless capability chips — derives its fill from\n * label-primary instead, which inverts with the theme by construction.\n * Elements that also carry a border or text may keep a layer fill.\n * `css-tokens.s8583e3_client.sfd9d8a_spec.s5f67aa_ts` pins this. */\n\n.s255e5a_panel {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n.s44a3ec_stateLine {\n margin: 0;\n color: var(--dsw-alias-label-primary);\n font-size: 13px;\n}\n\n/* Visually hidden but screen-reader readable (the loading copy while the\n * skeleton stands in visually). */\n.s3a0ece_srOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n overflow: hidden;\n white-space: nowrap;\n}\n\n/* The loading shelf: ghost cards with the same geometry as the real grid, so\n * the swap to content is a same-shape handoff instead of a jump. */\n.se0c3b4_skeletonGrid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n gap: 12px;\n}\n\n.s520416_skeletonCard {\n position: relative;\n display: flex;\n flex-direction: column;\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 10px;\n background: var(--dsw-alias-bg-layer-1);\n overflow: hidden;\n}\n\n/* The shimmer sweep: one gradient band travels across each ghost card while\n * the bars breathe, so the loading state reads as \"the shelf is scanning\". */\n.s520416_skeletonCard::after {\n content: '';\n position: absolute;\n inset: 0;\n background: linear-gradient(\n 100deg,\n transparent 25%,\n color-mix(in srgb, var(--dsw-alias-label-primary) 14%, transparent) 50%,\n transparent 75%\n );\n transform: translateX(-100%);\n animation: dshShopSkeletonSweep 1.4s ease-in-out infinite;\n pointer-events: none;\n}\n\n@keyframes dshShopSkeletonSweep {\n to { transform: translateX(100%); }\n}\n\n.s30e662_skeletonCover {\n display: block;\n height: 26px;\n background: color-mix(in srgb, var(--dsw-alias-label-primary) 10%, transparent);\n}\n\n.s8c7d6f_skeletonName {\n width: 55%;\n height: 14px;\n margin: 12px 12px 0;\n border-radius: 4px;\n background: color-mix(in srgb, var(--dsw-alias-label-primary) 8%, transparent);\n}\n\n.sf5179e_skeletonSummary {\n width: 92%;\n height: 12px;\n margin: 10px 12px 0;\n border-radius: 4px;\n background: color-mix(in srgb, var(--dsw-alias-label-primary) 8%, transparent);\n}\n\n.sbb0d25_skeletonSummaryShort {\n width: 68%;\n height: 12px;\n margin: 6px 12px 14px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--dsw-alias-label-primary) 8%, transparent);\n}\n\n.s520416_skeletonCard span {\n animation: dshShopSkeletonPulse 1.6s ease-in-out infinite;\n}\n\n@keyframes dshShopSkeletonPulse {\n 0%, 100% { opacity: 0.5; }\n 50% { opacity: 1; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .s520416_skeletonCard span { animation: none; opacity: 0.75; }\n .s520416_skeletonCard::after { content: none; }\n}\n\n.s73242a_actionButton {\n align-self: flex-start;\n padding: 5px 14px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n font-size: 13px;\n cursor: pointer;\n}\n\n.s73242a_actionButton:hover {\n border-color: color-mix(in srgb, var(--dsw-alias-brand-primary) 45%, var(--dsw-alias-border-l2));\n color: var(--dsw-alias-brand-primary);\n}\n\n.s73242a_actionButton:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n.s646509_toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.s232ec4_searchInput {\n width: min(280px, 100%);\n padding: 6px 10px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n background: var(--dsw-alias-bg-layer-1);\n color: var(--dsw-alias-label-primary);\n font-size: 13px;\n}\n\n.s232ec4_searchInput:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n.s1555aa_staleBlock {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.s3946f1_staleBadge {\n padding: 2px 8px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 14%, transparent);\n border: 1px solid color-mix(in srgb, var(--dsw-alias-state-warn-primary) 40%, transparent);\n color: var(--dsw-alias-state-warn-primary);\n font-size: 12px;\n}\n\n.s668774_catalogHeading {\n margin: 2px 0 0;\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0.02em;\n color: var(--dsw-alias-label-primary);\n}\n\n.sccc4d1_catalogStats {\n margin: -8px 0 0;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12px;\n letter-spacing: 0.02em;\n color: var(--dsw-alias-label-secondary);\n}\n\n.s6de1ab_emptyLine {\n margin: 0;\n color: var(--dsw-alias-label-primary);\n font-size: 13px;\n}\n\n/* The shelf: a responsive grid of cards. */\n.sf657f5_cards {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n gap: 12px;\n list-style: none;\n margin: 0;\n padding: 0;\n animation: dshShopCardsIn 220ms ease;\n}\n\n@keyframes dshShopCardsIn {\n from { opacity: 0; transform: translateY(3px); }\n to { opacity: 1; transform: none; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .sf657f5_cards { animation: none; }\n}\n\n.s65f383_card {\n position: relative;\n display: flex;\n flex-direction: column;\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 10px;\n background: var(--dsw-alias-bg-layer-1);\n overflow: hidden;\n transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;\n}\n\n.s65f383_card:hover {\n border-color: color-mix(in srgb, var(--dsw-alias-brand-primary) 45%, var(--dsw-alias-border-l1));\n transform: translateY(-1px);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--dsw-alias-brand-primary) 12%, transparent);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .s65f383_card { transition: none; }\n .s65f383_card:hover { transform: none; }\n}\n\n/* The signature: a brand spine in the category's own opacity. */\n.s4ce25d_cardSpine {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 3px;\n background: color-mix(in srgb, var(--dsw-alias-brand-primary) var(--spine-opacity, 40%), transparent);\n}\n\n.s65f383_card[data-category='tool'] { --spine-opacity: 100%; }\n.s65f383_card[data-category='provider'] { --spine-opacity: 82%; }\n.s65f383_card[data-category='ui'] { --spine-opacity: 64%; }\n.s65f383_card[data-category='workflow'] { --spine-opacity: 48%; }\n.s65f383_card[data-category='integration'] { --spine-opacity: 34%; }\n.s65f383_card[data-category='other'] { --spine-opacity: 22%; }\n\n.s9e2bec_cardCover {\n display: block;\n padding: 5px 12px 5px 12px;\n border-bottom: 1px solid var(--dsw-alias-border-l1);\n background: color-mix(in srgb, var(--dsw-alias-brand-primary) var(--spine-opacity, 40%), transparent);\n}\n\n.s1a7c5b_coverLabel {\n display: block;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--dsw-alias-brand-primary);\n}\n\n.sa97234_entryHeader {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 8px;\n padding: 10px 12px 6px;\n border: none;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.sa97234_entryHeader:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n}\n\n/* The name owns the full header width; badges sit on their own line below. */\n.sc3f149_name {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 13px;\n font-weight: 600;\n overflow-wrap: anywhere;\n color: var(--dsw-alias-label-primary);\n}\n\n.s513026_badges {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.s5e82cb_tierBadge {\n padding: 1px 7px;\n border-radius: 999px;\n font-size: 11px;\n line-height: 1.6;\n}\n\n.s5e82cb_tierBadge[data-tier='verified'] {\n color: var(--dsw-alias-state-success-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 14%, transparent);\n border: 1px solid color-mix(in srgb, var(--dsw-alias-state-success-primary) 40%, transparent);\n}\n\n.s5e82cb_tierBadge[data-tier='verified-stale'] {\n color: var(--dsw-alias-state-warn-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 14%, transparent);\n border: 1px solid color-mix(in srgb, var(--dsw-alias-state-warn-primary) 40%, transparent);\n}\n\n.s5e82cb_tierBadge[data-tier='community'] {\n color: var(--dsw-alias-label-secondary);\n background: var(--dsw-alias-bg-layer-2);\n border: 1px solid var(--dsw-alias-border-l2);\n}\n\n.s23e3e1_unclaimedBadge {\n padding: 1px 7px;\n border-radius: 999px;\n border: 1px dashed var(--dsw-alias-border-l2);\n font-size: 11px;\n line-height: 1.6;\n color: var(--dsw-alias-label-secondary);\n}\n\n.s73f7fb_chevron, .s61393c_chevronOpen {\n color: var(--dsw-alias-label-secondary);\n transition: transform 120ms ease;\n}\n\n.s61393c_chevronOpen { transform: rotate(180deg); }\n\n@media (prefers-reduced-motion: reduce) {\n .s73f7fb_chevron, .s61393c_chevronOpen { transition: none; }\n}\n\n.s820ebf_body {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 0 12px 12px;\n}\n\n.sb8fbc8_summary {\n margin: 0;\n font-size: 13px;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.se507db_summaryZh {\n margin: -4px 0 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.s9d2029_capabilitiesBlock {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.s3bdbd5_capabilitiesNote {\n margin: 0;\n font-size: 11px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.s441702_capabilities {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.s441702_capabilities li {\n padding: 1px 6px;\n border-radius: 4px;\n background: color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent);\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 11px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.sde3f0c_detail {\n border-top: 1px solid var(--dsw-alias-border-l1);\n padding-top: 8px;\n}\n\n.se98179_detailRows {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0;\n}\n\n.sfb4d2f_detailRow {\n display: flex;\n justify-content: space-between;\n gap: 12px;\n font-size: 12px;\n}\n\n.sfb4d2f_detailRow dt {\n color: var(--dsw-alias-label-secondary);\n}\n\n.sfb4d2f_detailRow dd {\n margin: 0;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n overflow-wrap: anywhere;\n text-align: right;\n color: var(--dsw-alias-label-primary);\n}\n\n.sd58c6d_reviewedLine {\n margin: 8px 0 0;\n padding: 6px 8px;\n border-radius: 6px;\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent);\n font-size: 12px;\n color: var(--dsw-alias-state-warn-primary);\n}\n\n/* Install flow. */\n.s4d374c_installPanel {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-top: 2px;\n}\n\n.se7aaed_installButton, .sb43a49_confirmButton, .s6e45d1_cancelButton {\n align-self: flex-start;\n padding: 5px 14px;\n border-radius: 6px;\n font-size: 13px;\n cursor: pointer;\n}\n\n.se7aaed_installButton {\n border: 1px solid var(--dsw-alias-brand-primary);\n background: var(--dsw-alias-brand-primary);\n color: var(--dsw-alias-bg-base);\n}\n\n.se7aaed_installButton:hover {\n background: color-mix(in srgb, var(--dsw-alias-brand-primary) 88%, var(--dsw-alias-label-primary));\n}\n\n.sb43a49_confirmButton {\n border: 1px solid var(--dsw-alias-brand-primary);\n background: var(--dsw-alias-brand-primary);\n color: var(--dsw-alias-bg-base);\n}\n\n.sb43a49_confirmButton:hover {\n background: color-mix(in srgb, var(--dsw-alias-brand-primary) 88%, var(--dsw-alias-label-primary));\n}\n\n.s6e45d1_cancelButton {\n border: 1px solid var(--dsw-alias-border-l2);\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n}\n\n.s6e45d1_cancelButton:hover {\n border-color: var(--dsw-alias-label-secondary);\n}\n\n.se7aaed_installButton:focus-visible, .sb43a49_confirmButton:focus-visible, .s6e45d1_cancelButton:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n.sc4f2ac_gate {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 10px;\n border: 1px solid var(--dsw-alias-state-warn-primary);\n border-radius: 8px;\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 8%, transparent);\n}\n\n.s559c38_gateTitle {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--dsw-alias-state-warn-primary);\n}\n\n.s3c0ace_gateBody {\n margin: 0;\n font-size: 12px;\n line-height: 1.6;\n color: var(--dsw-alias-label-primary);\n}\n\n.s4b2373_gateActions {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.s52b5a5_installing {\n margin: 0;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.s64ab71_log {\n max-height: 160px;\n overflow: auto;\n margin: 0;\n padding: 8px;\n border-radius: 6px;\n background: var(--dsw-alias-bg-base);\n border: 1px solid var(--dsw-alias-border-l1);\n list-style: none;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 11px;\n line-height: 1.5;\n}\n\n.s1531a8_logLine {\n white-space: pre-wrap;\n word-break: break-all;\n color: var(--dsw-alias-label-secondary);\n}\n\n.sf20dda_notice {\n margin: 0;\n font-size: 12px;\n color: var(--dsw-alias-state-success-primary);\n}\n\n.seb9b08_failedHeading {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-state-error-primary);\n}\n\n.sfd3021_failedDetail {\n margin: 0;\n font-size: 12px;\n line-height: 1.6;\n color: var(--dsw-alias-label-primary);\n}\n\n.s50ba35_rejectedCode {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-state-error-primary);\n}\n\n.se75489_rejectedDetail {\n margin: 0;\n font-size: 12px;\n line-height: 1.6;\n color: var(--dsw-alias-label-primary);\n}\n\n/* Installed section. */\n.sa276cf_outdatedSection {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-top: 6px;\n}\n\n.sceae6e_outdatedList {\n display: flex;\n flex-direction: column;\n gap: 8px;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.s8d2072_outdatedRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n flex-wrap: wrap;\n padding: 10px 12px;\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-1);\n}\n\n.s5c2545_outdatedInfo {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.s5c2545_outdatedInfo strong {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 13px;\n word-break: break-all;\n color: var(--dsw-alias-label-primary);\n}\n\n.s877c68_outdatedVersions {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.sa1f556_outdatedActions {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n/* The enable/disable switch. */\n.s11c019_switch {\n position: relative;\n width: 32px;\n height: 18px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 999px;\n background: var(--dsw-alias-bg-layer-2);\n cursor: pointer;\n transition: background 120ms ease, border-color 120ms ease;\n}\n\n.s7580e8_switchOn {\n border-color: var(--dsw-alias-state-success-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 55%, transparent);\n}\n\n.saab2b3_switchKnob {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 12px;\n height: 12px;\n border-radius: 999px;\n background: var(--dsw-alias-label-primary);\n transition: transform 120ms ease, background 120ms ease;\n}\n\n.s7580e8_switchOn .saab2b3_switchKnob {\n transform: translateX(14px);\n background: var(--dsw-alias-bg-base);\n}\n\n.s11c019_switch:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .s11c019_switch, .saab2b3_switchKnob { transition: none; }\n}\n";
|
|
4597
|
+
if (typeof document !== "undefined" && !document.querySelector("style[data-plugin-css=\"e3675a89\"]")) {
|
|
4597
4598
|
const tag = document.createElement("style");
|
|
4598
|
-
tag.dataset.pluginCss = "
|
|
4599
|
+
tag.dataset.pluginCss = "e3675a89";
|
|
4599
4600
|
tag.textContent = css;
|
|
4600
4601
|
document.head.appendChild(tag);
|
|
4601
4602
|
}
|
|
4602
|
-
var
|
|
4603
|
-
"client": "
|
|
4604
|
-
"config": "
|
|
4605
|
-
"ts": "
|
|
4606
|
-
"spec": "
|
|
4607
|
-
"panel": "
|
|
4608
|
-
"stateLine": "
|
|
4609
|
-
"srOnly": "
|
|
4610
|
-
"skeletonGrid": "
|
|
4611
|
-
"skeletonCard": "
|
|
4612
|
-
"skeletonCover": "
|
|
4613
|
-
"skeletonName": "
|
|
4614
|
-
"skeletonSummary": "
|
|
4615
|
-
"skeletonSummaryShort": "
|
|
4616
|
-
"actionButton": "
|
|
4617
|
-
"toolbar": "
|
|
4618
|
-
"searchInput": "
|
|
4619
|
-
"staleBlock": "
|
|
4620
|
-
"staleBadge": "
|
|
4621
|
-
"catalogHeading": "
|
|
4622
|
-
"catalogStats": "
|
|
4623
|
-
"emptyLine": "
|
|
4624
|
-
"cards": "
|
|
4625
|
-
"card": "
|
|
4626
|
-
"cardSpine": "
|
|
4627
|
-
"cardCover": "
|
|
4628
|
-
"coverLabel": "
|
|
4629
|
-
"entryHeader": "
|
|
4630
|
-
"name": "
|
|
4631
|
-
"badges": "
|
|
4632
|
-
"tierBadge": "
|
|
4633
|
-
"unclaimedBadge": "
|
|
4634
|
-
"chevron": "
|
|
4635
|
-
"chevronOpen": "
|
|
4636
|
-
"body": "
|
|
4637
|
-
"summary": "
|
|
4638
|
-
"summaryZh": "
|
|
4639
|
-
"capabilitiesBlock": "
|
|
4640
|
-
"capabilitiesNote": "
|
|
4641
|
-
"capabilities": "
|
|
4642
|
-
"detail": "
|
|
4643
|
-
"detailRows": "
|
|
4644
|
-
"detailRow": "
|
|
4645
|
-
"reviewedLine": "
|
|
4646
|
-
"installPanel": "
|
|
4647
|
-
"installButton": "
|
|
4648
|
-
"confirmButton": "
|
|
4649
|
-
"cancelButton": "
|
|
4650
|
-
"gate": "
|
|
4651
|
-
"gateTitle": "
|
|
4652
|
-
"gateBody": "
|
|
4653
|
-
"gateActions": "
|
|
4654
|
-
"installing": "
|
|
4655
|
-
"log": "
|
|
4656
|
-
"logLine": "
|
|
4657
|
-
"notice": "
|
|
4658
|
-
"failedHeading": "
|
|
4659
|
-
"failedDetail": "
|
|
4660
|
-
"rejectedCode": "
|
|
4661
|
-
"rejectedDetail": "
|
|
4662
|
-
"outdatedSection": "
|
|
4663
|
-
"outdatedList": "
|
|
4664
|
-
"outdatedRow": "
|
|
4665
|
-
"outdatedInfo": "
|
|
4666
|
-
"outdatedVersions": "
|
|
4667
|
-
"outdatedActions": "
|
|
4668
|
-
"switch": "
|
|
4669
|
-
"switchOn": "
|
|
4670
|
-
"switchKnob": "
|
|
4603
|
+
var _dsh_plugin_shop_css_e3675a89_default = {
|
|
4604
|
+
"client": "s8583e3_client",
|
|
4605
|
+
"config": "s942a79_config",
|
|
4606
|
+
"ts": "s5f67aa_ts",
|
|
4607
|
+
"spec": "sfd9d8a_spec",
|
|
4608
|
+
"panel": "s255e5a_panel",
|
|
4609
|
+
"stateLine": "s44a3ec_stateLine",
|
|
4610
|
+
"srOnly": "s3a0ece_srOnly",
|
|
4611
|
+
"skeletonGrid": "se0c3b4_skeletonGrid",
|
|
4612
|
+
"skeletonCard": "s520416_skeletonCard",
|
|
4613
|
+
"skeletonCover": "s30e662_skeletonCover",
|
|
4614
|
+
"skeletonName": "s8c7d6f_skeletonName",
|
|
4615
|
+
"skeletonSummary": "sf5179e_skeletonSummary",
|
|
4616
|
+
"skeletonSummaryShort": "sbb0d25_skeletonSummaryShort",
|
|
4617
|
+
"actionButton": "s73242a_actionButton",
|
|
4618
|
+
"toolbar": "s646509_toolbar",
|
|
4619
|
+
"searchInput": "s232ec4_searchInput",
|
|
4620
|
+
"staleBlock": "s1555aa_staleBlock",
|
|
4621
|
+
"staleBadge": "s3946f1_staleBadge",
|
|
4622
|
+
"catalogHeading": "s668774_catalogHeading",
|
|
4623
|
+
"catalogStats": "sccc4d1_catalogStats",
|
|
4624
|
+
"emptyLine": "s6de1ab_emptyLine",
|
|
4625
|
+
"cards": "sf657f5_cards",
|
|
4626
|
+
"card": "s65f383_card",
|
|
4627
|
+
"cardSpine": "s4ce25d_cardSpine",
|
|
4628
|
+
"cardCover": "s9e2bec_cardCover",
|
|
4629
|
+
"coverLabel": "s1a7c5b_coverLabel",
|
|
4630
|
+
"entryHeader": "sa97234_entryHeader",
|
|
4631
|
+
"name": "sc3f149_name",
|
|
4632
|
+
"badges": "s513026_badges",
|
|
4633
|
+
"tierBadge": "s5e82cb_tierBadge",
|
|
4634
|
+
"unclaimedBadge": "s23e3e1_unclaimedBadge",
|
|
4635
|
+
"chevron": "s73f7fb_chevron",
|
|
4636
|
+
"chevronOpen": "s61393c_chevronOpen",
|
|
4637
|
+
"body": "s820ebf_body",
|
|
4638
|
+
"summary": "sb8fbc8_summary",
|
|
4639
|
+
"summaryZh": "se507db_summaryZh",
|
|
4640
|
+
"capabilitiesBlock": "s9d2029_capabilitiesBlock",
|
|
4641
|
+
"capabilitiesNote": "s3bdbd5_capabilitiesNote",
|
|
4642
|
+
"capabilities": "s441702_capabilities",
|
|
4643
|
+
"detail": "sde3f0c_detail",
|
|
4644
|
+
"detailRows": "se98179_detailRows",
|
|
4645
|
+
"detailRow": "sfb4d2f_detailRow",
|
|
4646
|
+
"reviewedLine": "sd58c6d_reviewedLine",
|
|
4647
|
+
"installPanel": "s4d374c_installPanel",
|
|
4648
|
+
"installButton": "se7aaed_installButton",
|
|
4649
|
+
"confirmButton": "sb43a49_confirmButton",
|
|
4650
|
+
"cancelButton": "s6e45d1_cancelButton",
|
|
4651
|
+
"gate": "sc4f2ac_gate",
|
|
4652
|
+
"gateTitle": "s559c38_gateTitle",
|
|
4653
|
+
"gateBody": "s3c0ace_gateBody",
|
|
4654
|
+
"gateActions": "s4b2373_gateActions",
|
|
4655
|
+
"installing": "s52b5a5_installing",
|
|
4656
|
+
"log": "s64ab71_log",
|
|
4657
|
+
"logLine": "s1531a8_logLine",
|
|
4658
|
+
"notice": "sf20dda_notice",
|
|
4659
|
+
"failedHeading": "seb9b08_failedHeading",
|
|
4660
|
+
"failedDetail": "sfd3021_failedDetail",
|
|
4661
|
+
"rejectedCode": "s50ba35_rejectedCode",
|
|
4662
|
+
"rejectedDetail": "se75489_rejectedDetail",
|
|
4663
|
+
"outdatedSection": "sa276cf_outdatedSection",
|
|
4664
|
+
"outdatedList": "sceae6e_outdatedList",
|
|
4665
|
+
"outdatedRow": "s8d2072_outdatedRow",
|
|
4666
|
+
"outdatedInfo": "s5c2545_outdatedInfo",
|
|
4667
|
+
"outdatedVersions": "s877c68_outdatedVersions",
|
|
4668
|
+
"outdatedActions": "sa1f556_outdatedActions",
|
|
4669
|
+
"switch": "s11c019_switch",
|
|
4670
|
+
"switchOn": "s7580e8_switchOn",
|
|
4671
|
+
"switchKnob": "saab2b3_switchKnob"
|
|
4671
4672
|
};
|
|
4672
4673
|
//#endregion
|
|
4673
|
-
//#region src/client/
|
|
4674
|
-
/** The
|
|
4674
|
+
//#region src/client/ShopTab.tsx
|
|
4675
|
+
/** The shop tab: browse the catalog, detail an entry, install with the
|
|
4675
4676
|
* acknowledgement gate, poll the install to its terminal state (§7.2).
|
|
4676
4677
|
* Everything the tab renders is text — summaries, capabilities, log lines,
|
|
4677
4678
|
* details — never markup, so hostile npm descriptions cannot inject (spec
|
|
@@ -4682,7 +4683,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4682
4683
|
width: "14",
|
|
4683
4684
|
height: "14",
|
|
4684
4685
|
"aria-hidden": "true",
|
|
4685
|
-
className: open ?
|
|
4686
|
+
className: open ? _dsh_plugin_shop_css_e3675a89_default.chevronOpen : _dsh_plugin_shop_css_e3675a89_default.chevron,
|
|
4686
4687
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
4687
4688
|
fill: "currentColor",
|
|
4688
4689
|
d: "M3.5 6 8 10.5 12.5 6l1 1L8 12.5 2.5 7l1-1Z"
|
|
@@ -4699,41 +4700,41 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4699
4700
|
const summary = entry.catalog?.summary;
|
|
4700
4701
|
const category = entry.catalog?.category ?? "other";
|
|
4701
4702
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4702
|
-
className:
|
|
4703
|
-
"data-
|
|
4703
|
+
className: _dsh_plugin_shop_css_e3675a89_default.card,
|
|
4704
|
+
"data-shop-entry": entry.name,
|
|
4704
4705
|
"data-category": category,
|
|
4705
4706
|
children: [
|
|
4706
4707
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4707
|
-
className:
|
|
4708
|
+
className: _dsh_plugin_shop_css_e3675a89_default.cardSpine,
|
|
4708
4709
|
"aria-hidden": "true"
|
|
4709
4710
|
}),
|
|
4710
4711
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4711
|
-
className:
|
|
4712
|
+
className: _dsh_plugin_shop_css_e3675a89_default.cardCover,
|
|
4712
4713
|
"aria-hidden": "true",
|
|
4713
4714
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4714
|
-
className:
|
|
4715
|
+
className: _dsh_plugin_shop_css_e3675a89_default.coverLabel,
|
|
4715
4716
|
children: t(categoryKey(entry))
|
|
4716
4717
|
})
|
|
4717
4718
|
}),
|
|
4718
4719
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
4719
4720
|
type: "button",
|
|
4720
|
-
className:
|
|
4721
|
+
className: _dsh_plugin_shop_css_e3675a89_default.entryHeader,
|
|
4721
4722
|
"aria-expanded": open,
|
|
4722
4723
|
"aria-controls": detailId,
|
|
4723
4724
|
onClick: () => setOpen((current) => !current),
|
|
4724
4725
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4725
|
-
className:
|
|
4726
|
+
className: _dsh_plugin_shop_css_e3675a89_default.name,
|
|
4726
4727
|
children: entry.name
|
|
4727
4728
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4728
|
-
className:
|
|
4729
|
+
className: _dsh_plugin_shop_css_e3675a89_default.badges,
|
|
4729
4730
|
children: [
|
|
4730
4731
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4731
|
-
className:
|
|
4732
|
+
className: _dsh_plugin_shop_css_e3675a89_default.tierBadge,
|
|
4732
4733
|
"data-tier": entry.tier,
|
|
4733
4734
|
children: t(tierKey(entry.tier))
|
|
4734
4735
|
}),
|
|
4735
4736
|
isUnclaimed(entry) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4736
|
-
className:
|
|
4737
|
+
className: _dsh_plugin_shop_css_e3675a89_default.unclaimedBadge,
|
|
4737
4738
|
children: t("unclaimed")
|
|
4738
4739
|
}),
|
|
4739
4740
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronIcon, { open })
|
|
@@ -4741,47 +4742,47 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4741
4742
|
})]
|
|
4742
4743
|
}),
|
|
4743
4744
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4744
|
-
className:
|
|
4745
|
+
className: _dsh_plugin_shop_css_e3675a89_default.body,
|
|
4745
4746
|
children: [
|
|
4746
4747
|
summary !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4747
|
-
className:
|
|
4748
|
+
className: _dsh_plugin_shop_css_e3675a89_default.summary,
|
|
4748
4749
|
children: summary.en
|
|
4749
4750
|
}),
|
|
4750
4751
|
summary?.zh !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4751
|
-
className:
|
|
4752
|
+
className: _dsh_plugin_shop_css_e3675a89_default.summaryZh,
|
|
4752
4753
|
children: summary.zh
|
|
4753
4754
|
}),
|
|
4754
4755
|
entry.catalog !== void 0 && entry.catalog.capabilities.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4755
|
-
className:
|
|
4756
|
+
className: _dsh_plugin_shop_css_e3675a89_default.capabilitiesBlock,
|
|
4756
4757
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4757
|
-
className:
|
|
4758
|
+
className: _dsh_plugin_shop_css_e3675a89_default.capabilitiesNote,
|
|
4758
4759
|
children: t("capabilitiesNote")
|
|
4759
4760
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
4760
|
-
className:
|
|
4761
|
+
className: _dsh_plugin_shop_css_e3675a89_default.capabilities,
|
|
4761
4762
|
children: entry.catalog.capabilities.map((capability) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: capability }, capability))
|
|
4762
4763
|
})]
|
|
4763
4764
|
}),
|
|
4764
4765
|
open && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
4765
4766
|
id: detailId,
|
|
4766
|
-
className:
|
|
4767
|
+
className: _dsh_plugin_shop_css_e3675a89_default.detail,
|
|
4767
4768
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", {
|
|
4768
|
-
className:
|
|
4769
|
+
className: _dsh_plugin_shop_css_e3675a89_default.detailRows,
|
|
4769
4770
|
children: [
|
|
4770
4771
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4771
|
-
className:
|
|
4772
|
+
className: _dsh_plugin_shop_css_e3675a89_default.detailRow,
|
|
4772
4773
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("version") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: entry.version })]
|
|
4773
4774
|
}),
|
|
4774
4775
|
entry.repository !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4775
|
-
className:
|
|
4776
|
+
className: _dsh_plugin_shop_css_e3675a89_default.detailRow,
|
|
4776
4777
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("repository") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: entry.repository })]
|
|
4777
4778
|
}),
|
|
4778
4779
|
entry.license !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4779
|
-
className:
|
|
4780
|
+
className: _dsh_plugin_shop_css_e3675a89_default.detailRow,
|
|
4780
4781
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("license") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: entry.license })]
|
|
4781
4782
|
})
|
|
4782
4783
|
]
|
|
4783
4784
|
}), entry.tier === "verified-stale" && entry.review !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4784
|
-
className:
|
|
4785
|
+
className: _dsh_plugin_shop_css_e3675a89_default.reviewedLine,
|
|
4785
4786
|
children: t("reviewedVersionLine", {
|
|
4786
4787
|
reviewed: entry.review.reviewedVersion,
|
|
4787
4788
|
current: entry.version
|
|
@@ -4810,70 +4811,70 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4810
4811
|
const [gateOpen, setGateOpen] = (0, react.useState)(false);
|
|
4811
4812
|
const { view, start } = useInstall(install, installStatus);
|
|
4812
4813
|
if (view.kind === "running") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4813
|
-
className:
|
|
4814
|
+
className: _dsh_plugin_shop_css_e3675a89_default.installPanel,
|
|
4814
4815
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4815
|
-
className:
|
|
4816
|
+
className: _dsh_plugin_shop_css_e3675a89_default.installing,
|
|
4816
4817
|
children: t("installing")
|
|
4817
4818
|
}), view.log.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4818
|
-
className:
|
|
4819
|
+
className: _dsh_plugin_shop_css_e3675a89_default.log,
|
|
4819
4820
|
children: view.log.map((line, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4820
|
-
className:
|
|
4821
|
+
className: _dsh_plugin_shop_css_e3675a89_default.logLine,
|
|
4821
4822
|
children: line
|
|
4822
4823
|
}, index))
|
|
4823
4824
|
})]
|
|
4824
4825
|
});
|
|
4825
4826
|
if (view.kind === "done") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4826
|
-
className:
|
|
4827
|
-
"data-
|
|
4827
|
+
className: _dsh_plugin_shop_css_e3675a89_default.notice,
|
|
4828
|
+
"data-shop-restart-notice": true,
|
|
4828
4829
|
children: view.needsRestart ? t("installedRestartNotice") : t("installedNoRestartNotice")
|
|
4829
4830
|
});
|
|
4830
4831
|
if (view.kind === "failed") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4831
|
-
className:
|
|
4832
|
+
className: _dsh_plugin_shop_css_e3675a89_default.installPanel,
|
|
4832
4833
|
children: [
|
|
4833
4834
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4834
|
-
className:
|
|
4835
|
+
className: _dsh_plugin_shop_css_e3675a89_default.failedHeading,
|
|
4835
4836
|
children: t("installFailed")
|
|
4836
4837
|
}),
|
|
4837
4838
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4838
|
-
className:
|
|
4839
|
+
className: _dsh_plugin_shop_css_e3675a89_default.log,
|
|
4839
4840
|
children: view.log.map((line, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4840
|
-
className:
|
|
4841
|
+
className: _dsh_plugin_shop_css_e3675a89_default.logLine,
|
|
4841
4842
|
children: line
|
|
4842
4843
|
}, index))
|
|
4843
4844
|
}),
|
|
4844
4845
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4845
|
-
className:
|
|
4846
|
+
className: _dsh_plugin_shop_css_e3675a89_default.failedDetail,
|
|
4846
4847
|
children: view.detail === "" ? t("installTransportFailed") : view.detail
|
|
4847
4848
|
})
|
|
4848
4849
|
]
|
|
4849
4850
|
});
|
|
4850
4851
|
if (view.kind === "rejected") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4851
|
-
className:
|
|
4852
|
+
className: _dsh_plugin_shop_css_e3675a89_default.installPanel,
|
|
4852
4853
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4853
|
-
className:
|
|
4854
|
+
className: _dsh_plugin_shop_css_e3675a89_default.rejectedCode,
|
|
4854
4855
|
children: t(rejectionCodeKey(view.code))
|
|
4855
4856
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4856
|
-
className:
|
|
4857
|
+
className: _dsh_plugin_shop_css_e3675a89_default.rejectedDetail,
|
|
4857
4858
|
children: view.detail
|
|
4858
4859
|
})]
|
|
4859
4860
|
});
|
|
4860
4861
|
if (gateOpen) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4861
|
-
className:
|
|
4862
|
+
className: _dsh_plugin_shop_css_e3675a89_default.gate,
|
|
4862
4863
|
children: [
|
|
4863
4864
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4864
|
-
className:
|
|
4865
|
+
className: _dsh_plugin_shop_css_e3675a89_default.gateTitle,
|
|
4865
4866
|
children: t("acknowledgementTitle")
|
|
4866
4867
|
}),
|
|
4867
4868
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4868
|
-
className:
|
|
4869
|
+
className: _dsh_plugin_shop_css_e3675a89_default.gateBody,
|
|
4869
4870
|
children: t("acknowledgementBody")
|
|
4870
4871
|
}),
|
|
4871
4872
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4872
|
-
className:
|
|
4873
|
+
className: _dsh_plugin_shop_css_e3675a89_default.gateActions,
|
|
4873
4874
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4874
4875
|
type: "button",
|
|
4875
|
-
className:
|
|
4876
|
-
"data-
|
|
4876
|
+
className: _dsh_plugin_shop_css_e3675a89_default.confirmButton,
|
|
4877
|
+
"data-shop-confirm": true,
|
|
4877
4878
|
onClick: () => {
|
|
4878
4879
|
setGateOpen(false);
|
|
4879
4880
|
start({
|
|
@@ -4885,7 +4886,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4885
4886
|
children: t("confirm")
|
|
4886
4887
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4887
4888
|
type: "button",
|
|
4888
|
-
className:
|
|
4889
|
+
className: _dsh_plugin_shop_css_e3675a89_default.cancelButton,
|
|
4889
4890
|
onClick: () => setGateOpen(false),
|
|
4890
4891
|
children: t("cancel")
|
|
4891
4892
|
})]
|
|
@@ -4895,8 +4896,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4895
4896
|
const update = variant === "update";
|
|
4896
4897
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4897
4898
|
type: "button",
|
|
4898
|
-
className:
|
|
4899
|
-
...update ? { "data-
|
|
4899
|
+
className: _dsh_plugin_shop_css_e3675a89_default.installButton,
|
|
4900
|
+
...update ? { "data-shop-update": true } : { "data-shop-install": true },
|
|
4900
4901
|
onClick: () => {
|
|
4901
4902
|
if (tier === "verified") start({
|
|
4902
4903
|
name,
|
|
@@ -4941,37 +4942,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4941
4942
|
}
|
|
4942
4943
|
};
|
|
4943
4944
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4944
|
-
className:
|
|
4945
|
-
"data-
|
|
4945
|
+
className: _dsh_plugin_shop_css_e3675a89_default.outdatedRow,
|
|
4946
|
+
"data-shop-outdated-entry": row.name,
|
|
4946
4947
|
children: [
|
|
4947
4948
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4948
|
-
className:
|
|
4949
|
+
className: _dsh_plugin_shop_css_e3675a89_default.outdatedInfo,
|
|
4949
4950
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4950
|
-
className:
|
|
4951
|
+
className: _dsh_plugin_shop_css_e3675a89_default.name,
|
|
4951
4952
|
children: row.name
|
|
4952
4953
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4953
|
-
className:
|
|
4954
|
+
className: _dsh_plugin_shop_css_e3675a89_default.outdatedVersions,
|
|
4954
4955
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4955
|
-
className:
|
|
4956
|
+
className: _dsh_plugin_shop_css_e3675a89_default.outdatedVersion,
|
|
4956
4957
|
children: t("installedVersion", { version: row.installed })
|
|
4957
4958
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4958
|
-
className:
|
|
4959
|
+
className: _dsh_plugin_shop_css_e3675a89_default.outdatedVersion,
|
|
4959
4960
|
children: t("latestVersion", { version: row.latest })
|
|
4960
4961
|
})]
|
|
4961
4962
|
})]
|
|
4962
4963
|
}),
|
|
4963
4964
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4964
|
-
className:
|
|
4965
|
+
className: _dsh_plugin_shop_css_e3675a89_default.outdatedActions,
|
|
4965
4966
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4966
4967
|
type: "button",
|
|
4967
4968
|
role: "switch",
|
|
4968
4969
|
"aria-checked": enabled,
|
|
4969
4970
|
"aria-label": t("enabledSwitch"),
|
|
4970
|
-
"data-
|
|
4971
|
-
className: `${
|
|
4971
|
+
"data-shop-toggle": true,
|
|
4972
|
+
className: `${_dsh_plugin_shop_css_e3675a89_default.switch} ${enabled ? _dsh_plugin_shop_css_e3675a89_default.switchOn : ""}`,
|
|
4972
4973
|
onClick: () => void onToggle(),
|
|
4973
4974
|
disabled: toggle.kind === "saving",
|
|
4974
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className:
|
|
4975
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: _dsh_plugin_shop_css_e3675a89_default.switchKnob })
|
|
4975
4976
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InstallPanel, {
|
|
4976
4977
|
name: row.name,
|
|
4977
4978
|
version: row.latest,
|
|
@@ -4983,13 +4984,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4983
4984
|
})]
|
|
4984
4985
|
}),
|
|
4985
4986
|
toggle.kind === "saved" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4986
|
-
className:
|
|
4987
|
-
"data-
|
|
4987
|
+
className: _dsh_plugin_shop_css_e3675a89_default.notice,
|
|
4988
|
+
"data-shop-hot-apply": true,
|
|
4988
4989
|
children: t("hotApplyNote")
|
|
4989
4990
|
}),
|
|
4990
4991
|
toggle.kind === "error" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4991
|
-
className:
|
|
4992
|
-
"data-
|
|
4992
|
+
className: _dsh_plugin_shop_css_e3675a89_default.failedDetail,
|
|
4993
|
+
"data-shop-toggle-error": true,
|
|
4993
4994
|
children: toggle.detail
|
|
4994
4995
|
})
|
|
4995
4996
|
]
|
|
@@ -5002,19 +5003,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5002
5003
|
function OutdatedSection({ state, tiers, t, setEnabled, install, installStatus }) {
|
|
5003
5004
|
if (state.kind === "loading") return null;
|
|
5004
5005
|
if (state.kind === "error") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5005
|
-
className:
|
|
5006
|
-
"data-
|
|
5006
|
+
className: _dsh_plugin_shop_css_e3675a89_default.stateLine,
|
|
5007
|
+
"data-shop-outdated-error": true,
|
|
5007
5008
|
children: t("error")
|
|
5008
5009
|
});
|
|
5009
5010
|
if (state.entries.length === 0) return null;
|
|
5010
5011
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
5011
|
-
className:
|
|
5012
|
-
"data-
|
|
5012
|
+
className: _dsh_plugin_shop_css_e3675a89_default.outdatedSection,
|
|
5013
|
+
"data-shop-outdated": true,
|
|
5013
5014
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
5014
|
-
className:
|
|
5015
|
+
className: _dsh_plugin_shop_css_e3675a89_default.catalogHeading,
|
|
5015
5016
|
children: t("installedSection")
|
|
5016
5017
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
5017
|
-
className:
|
|
5018
|
+
className: _dsh_plugin_shop_css_e3675a89_default.outdatedList,
|
|
5018
5019
|
children: state.entries.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OutdatedRow, {
|
|
5019
5020
|
row,
|
|
5020
5021
|
tier: tiers.get(row.name) ?? "community",
|
|
@@ -5026,9 +5027,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5026
5027
|
})]
|
|
5027
5028
|
});
|
|
5028
5029
|
}
|
|
5029
|
-
/** The
|
|
5030
|
+
/** The shop tab root: browse, search, refresh, and render one card per
|
|
5030
5031
|
* entry. Data attributes on the e2e-relevant nodes follow the Task 3 list. */
|
|
5031
|
-
function
|
|
5032
|
+
function ShopTab(props) {
|
|
5032
5033
|
const { t, catalog, install, installStatus, setEnabled, outdated } = props;
|
|
5033
5034
|
const [catalogState, setCatalogState] = (0, react.useState)({ kind: "loading" });
|
|
5034
5035
|
const [outdatedState, setOutdatedState] = (0, react.useState)({ kind: "loading" });
|
|
@@ -5075,7 +5076,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5075
5076
|
if (catalogState.kind !== "ready") return [];
|
|
5076
5077
|
const q = query.trim().toLowerCase();
|
|
5077
5078
|
return catalogState.result.plugins.filter((entry) => {
|
|
5078
|
-
if (
|
|
5079
|
+
if (isShopLike(entry.name)) return false;
|
|
5079
5080
|
if (q === "") return true;
|
|
5080
5081
|
const summaryEn = entry.catalog?.summary.en ?? "";
|
|
5081
5082
|
const summaryZh = entry.catalog?.summary.zh ?? "";
|
|
@@ -5088,86 +5089,86 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5088
5089
|
return map;
|
|
5089
5090
|
}, [catalogState]);
|
|
5090
5091
|
if (catalogState.kind === "loading") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5091
|
-
className:
|
|
5092
|
-
"data-
|
|
5092
|
+
className: _dsh_plugin_shop_css_e3675a89_default.panel,
|
|
5093
|
+
"data-shop-tab": true,
|
|
5093
5094
|
"aria-busy": "true",
|
|
5094
5095
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5095
|
-
className:
|
|
5096
|
+
className: _dsh_plugin_shop_css_e3675a89_default.srOnly,
|
|
5096
5097
|
children: t("loading")
|
|
5097
5098
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5098
|
-
className:
|
|
5099
|
-
"data-
|
|
5099
|
+
className: _dsh_plugin_shop_css_e3675a89_default.skeletonGrid,
|
|
5100
|
+
"data-shop-skeleton": true,
|
|
5100
5101
|
"aria-hidden": "true",
|
|
5101
5102
|
children: Array.from({ length: 8 }, (_, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5102
|
-
className:
|
|
5103
|
+
className: _dsh_plugin_shop_css_e3675a89_default.skeletonCard,
|
|
5103
5104
|
children: [
|
|
5104
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className:
|
|
5105
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className:
|
|
5106
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className:
|
|
5107
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className:
|
|
5105
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: _dsh_plugin_shop_css_e3675a89_default.skeletonCover }),
|
|
5106
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: _dsh_plugin_shop_css_e3675a89_default.skeletonName }),
|
|
5107
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: _dsh_plugin_shop_css_e3675a89_default.skeletonSummary }),
|
|
5108
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: _dsh_plugin_shop_css_e3675a89_default.skeletonSummaryShort })
|
|
5108
5109
|
]
|
|
5109
5110
|
}, i))
|
|
5110
5111
|
})]
|
|
5111
5112
|
});
|
|
5112
5113
|
if (catalogState.kind === "error") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5113
|
-
className:
|
|
5114
|
-
"data-
|
|
5114
|
+
className: _dsh_plugin_shop_css_e3675a89_default.panel,
|
|
5115
|
+
"data-shop-tab": true,
|
|
5115
5116
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5116
|
-
className:
|
|
5117
|
+
className: _dsh_plugin_shop_css_e3675a89_default.stateLine,
|
|
5117
5118
|
children: t("error")
|
|
5118
5119
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5119
5120
|
type: "button",
|
|
5120
|
-
className:
|
|
5121
|
+
className: _dsh_plugin_shop_css_e3675a89_default.actionButton,
|
|
5121
5122
|
onClick: () => setRequest({ kind: "retry" }),
|
|
5122
5123
|
children: t("retry")
|
|
5123
5124
|
})]
|
|
5124
5125
|
});
|
|
5125
5126
|
const { result } = catalogState;
|
|
5126
5127
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5127
|
-
className:
|
|
5128
|
-
"data-
|
|
5128
|
+
className: _dsh_plugin_shop_css_e3675a89_default.panel,
|
|
5129
|
+
"data-shop-tab": true,
|
|
5129
5130
|
children: [
|
|
5130
5131
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5131
|
-
className:
|
|
5132
|
+
className: _dsh_plugin_shop_css_e3675a89_default.toolbar,
|
|
5132
5133
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
5133
5134
|
type: "search",
|
|
5134
|
-
className:
|
|
5135
|
+
className: _dsh_plugin_shop_css_e3675a89_default.searchInput,
|
|
5135
5136
|
"aria-label": t("search"),
|
|
5136
5137
|
placeholder: t("search"),
|
|
5137
5138
|
value: query,
|
|
5138
5139
|
onChange: (event) => setQuery(event.target.value)
|
|
5139
5140
|
}), result.stale && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5140
|
-
className:
|
|
5141
|
+
className: _dsh_plugin_shop_css_e3675a89_default.staleBlock,
|
|
5141
5142
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5142
|
-
className:
|
|
5143
|
+
className: _dsh_plugin_shop_css_e3675a89_default.staleBadge,
|
|
5143
5144
|
children: t("staleLabel", { date: result.builtAt.slice(0, 10) })
|
|
5144
5145
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5145
5146
|
type: "button",
|
|
5146
|
-
className:
|
|
5147
|
+
className: _dsh_plugin_shop_css_e3675a89_default.actionButton,
|
|
5147
5148
|
onClick: () => setRequest({ kind: "refresh" }),
|
|
5148
5149
|
children: t("refresh")
|
|
5149
5150
|
})]
|
|
5150
5151
|
})]
|
|
5151
5152
|
}),
|
|
5152
5153
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
5153
|
-
className:
|
|
5154
|
+
className: _dsh_plugin_shop_css_e3675a89_default.catalogHeading,
|
|
5154
5155
|
children: t("catalog")
|
|
5155
5156
|
}),
|
|
5156
5157
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5157
|
-
className:
|
|
5158
|
+
className: _dsh_plugin_shop_css_e3675a89_default.catalogStats,
|
|
5158
5159
|
children: t("catalogStats", {
|
|
5159
5160
|
count: String(result.plugins.length),
|
|
5160
5161
|
date: result.builtAt.slice(0, 10)
|
|
5161
5162
|
})
|
|
5162
5163
|
}),
|
|
5163
5164
|
result.plugins.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5164
|
-
className:
|
|
5165
|
+
className: _dsh_plugin_shop_css_e3675a89_default.emptyLine,
|
|
5165
5166
|
children: t("empty")
|
|
5166
5167
|
}) : filtered.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5167
|
-
className:
|
|
5168
|
+
className: _dsh_plugin_shop_css_e3675a89_default.emptyLine,
|
|
5168
5169
|
children: t("emptySearch")
|
|
5169
5170
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
5170
|
-
className:
|
|
5171
|
+
className: _dsh_plugin_shop_css_e3675a89_default.cards,
|
|
5171
5172
|
children: filtered.map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EntryCard, {
|
|
5172
5173
|
entry,
|
|
5173
5174
|
t,
|
|
@@ -5189,34 +5190,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5189
5190
|
//#endregion
|
|
5190
5191
|
//#region src/client/index.ts
|
|
5191
5192
|
/** Dictionary namespace owned by this plugin. */
|
|
5192
|
-
const NS = "settings.
|
|
5193
|
+
const NS = "settings.shop";
|
|
5193
5194
|
/** Services required by the tab registration and the Remote mount.
|
|
5194
5195
|
*
|
|
5195
|
-
* `remote.
|
|
5196
|
+
* `remote.shop` is deliberately ABSENT: this package both mounts its own
|
|
5196
5197
|
* Remote (the assembly does not know it, §7.3) and consumes it, and cordis
|
|
5197
5198
|
* will not let one package do both through the inject face. Declaring the
|
|
5198
|
-
* face makes the boot's activation gate wait for the `remote.
|
|
5199
|
+
* face makes the boot's activation gate wait for the `remote.shop` service —
|
|
5199
5200
|
* which only this package's own apply can register — and the real web boot
|
|
5200
|
-
* deadlocked on exactly that ("waiting for service: remote.
|
|
5201
|
-
* namespace is therefore read through the reflect
|
|
5201
|
+
* deadlocked on exactly that ("waiting for service: remote.shop"). The
|
|
5202
|
+
* namespace is therefore read through the reflect shop instead (`ctx.get`,
|
|
5202
5203
|
* see apply), which has no inject requirement. */
|
|
5203
5204
|
const inject = [
|
|
5204
5205
|
"remote",
|
|
5205
5206
|
"slots",
|
|
5206
5207
|
"locale"
|
|
5207
5208
|
];
|
|
5208
|
-
/** Mount the
|
|
5209
|
+
/** Mount the shop Remote and contribute the shop tab. */
|
|
5209
5210
|
async function apply(ctx) {
|
|
5210
5211
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
5211
5212
|
zh,
|
|
5212
5213
|
en
|
|
5213
5214
|
}), "dsh-plugin-shop: dictionaries");
|
|
5214
5215
|
const dispose = await ctx.remote.$mount(TYPERT_REMOTE);
|
|
5215
|
-
ctx.effect(() => dispose, "dsh-plugin-shop:
|
|
5216
|
-
const ns = ctx.get("remote.
|
|
5217
|
-
if (ns === void 0) throw new Error("dsh-plugin-shop: the
|
|
5216
|
+
ctx.effect(() => dispose, "dsh-plugin-shop: shop remote mount");
|
|
5217
|
+
const ns = ctx.get("remote.shop");
|
|
5218
|
+
if (ns === void 0) throw new Error("dsh-plugin-shop: the shop remote did not register (service \"remote.shop\" missing after $mount)");
|
|
5218
5219
|
const unwrap = (result) => {
|
|
5219
|
-
if (!result.ok) throw new Error(`
|
|
5220
|
+
if (!result.ok) throw new Error(`shop remote: ${result.error.code}: ${result.error.message}`);
|
|
5220
5221
|
return result.value;
|
|
5221
5222
|
};
|
|
5222
5223
|
const injected = () => ({
|
|
@@ -5228,12 +5229,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5228
5229
|
});
|
|
5229
5230
|
ctx.slots.inject("settings.plugins.tab", () => ctx.slots.register({
|
|
5230
5231
|
name: "settings.plugins.tab",
|
|
5231
|
-
id: "
|
|
5232
|
+
id: "shop",
|
|
5232
5233
|
order: 20,
|
|
5233
5234
|
label: () => ctx.locale.bind(NS)("tab"),
|
|
5234
5235
|
locale: NS,
|
|
5235
5236
|
inject: injected
|
|
5236
|
-
},
|
|
5237
|
+
}, ShopTab));
|
|
5237
5238
|
}
|
|
5238
5239
|
//#endregion
|
|
5239
5240
|
exports.NS = NS;
|