@kubohiroya/turbowarp-extension-security-dialog 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -394,7 +394,7 @@ var messages = {
394
394
  "pending": "Getting metadata\u2026",
395
395
  "failed": "Could not retrieve metadata",
396
396
  "required": "This extension cannot run inside the sandbox. Choose Without sandbox, or Cancel to stop loading the project.",
397
- "requiredToRun": "Required to run",
397
+ "requiredToRun": "Required",
398
398
  "unsupported": "Unsupported",
399
399
  "choiceReset": "The incompatible selection was cleared. Choose how to run this extension again.",
400
400
  "bulkNote": "Applies only to extensions that support this mode.",
@@ -414,7 +414,7 @@ var messages = {
414
414
  "warning": "Extensions without a sandbox can access your project and browser information."
415
415
  },
416
416
  "ja": {
417
- "securityInstruction": "\u26A0\uFE0F\u30DE\u30FC\u30AF\u306E\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u62E1\u5F35\u3092\u5236\u4F5C\u8005\u306E\u610F\u56F3\u3069\u304A\u308A\u306B\u52D5\u4F5C\u3055\u305B\u308B\u305F\u3081\u306B\u306F\u300E\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300F\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
417
+ "securityInstruction": "\u300C\u26A0\uFE0F\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\uFF1A\u5FC5\u8981\u300D\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u62E1\u5F35\u3092\u5236\u4F5C\u8005\u306E\u610F\u56F3\u3069\u304A\u308A\u306B\u52D5\u4F5C\u3055\u305B\u308B\u305F\u3081\u306B\u306F\u300E\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300F\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
418
418
  "catalogCancelDestination": "\u300E\u30AD\u30E3\u30F3\u30BB\u30EB\u300F\u3067\u9078\u629E\u4E00\u89A7\u306B\u623B\u308A\u307E\u3059\u3002",
419
419
  "selectionIntro": "\u8FFD\u52A0\u3059\u308B\u6A5F\u80FD\u62E1\u5F35\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002\u4F9D\u5B58\u3059\u308B\u6A5F\u80FD\u62E1\u5F35\u3082\u81EA\u52D5\u3067\u9078\u629E\u3055\u308C\u307E\u3059\u3002",
420
420
  "documentationFor": "{name}: \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8",
@@ -464,7 +464,7 @@ var messages = {
464
464
  "pending": "\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u4E2D\u2026",
465
465
  "failed": "\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F",
466
466
  "required": "\u3053\u306E\u62E1\u5F35\u306F\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u5185\u3067\u306F\u52D5\u4F5C\u3057\u307E\u305B\u3093\u3002\u300C\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300D\u3092\u9078\u3076\u304B\u3001\u300C\u30AD\u30E3\u30F3\u30BB\u30EB\u300D\u3067\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u3092\u4E2D\u6B62\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
467
- "requiredToRun": "\u52D5\u4F5C\u306B\u5FC5\u8981",
467
+ "requiredToRun": "\u5FC5\u8981",
468
468
  "unsupported": "\u975E\u5BFE\u5FDC",
469
469
  "choiceReset": "\u975E\u5BFE\u5FDC\u306E\u9078\u629E\u3092\u89E3\u9664\u3057\u307E\u3057\u305F\u3002\u5B9F\u884C\u65B9\u6CD5\u3092\u9078\u3073\u76F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
470
470
  "bulkNote": "\u305D\u306E\u30E2\u30FC\u30C9\u306B\u5BFE\u5FDC\u3059\u308B\u62E1\u5F35\u3060\u3051\u306B\u9069\u7528\u3057\u307E\u3059\u3002",
package/dist/index.mjs CHANGED
@@ -345,7 +345,7 @@ var messages = {
345
345
  "pending": "Getting metadata\u2026",
346
346
  "failed": "Could not retrieve metadata",
347
347
  "required": "This extension cannot run inside the sandbox. Choose Without sandbox, or Cancel to stop loading the project.",
348
- "requiredToRun": "Required to run",
348
+ "requiredToRun": "Required",
349
349
  "unsupported": "Unsupported",
350
350
  "choiceReset": "The incompatible selection was cleared. Choose how to run this extension again.",
351
351
  "bulkNote": "Applies only to extensions that support this mode.",
@@ -365,7 +365,7 @@ var messages = {
365
365
  "warning": "Extensions without a sandbox can access your project and browser information."
366
366
  },
367
367
  "ja": {
368
- "securityInstruction": "\u26A0\uFE0F\u30DE\u30FC\u30AF\u306E\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u62E1\u5F35\u3092\u5236\u4F5C\u8005\u306E\u610F\u56F3\u3069\u304A\u308A\u306B\u52D5\u4F5C\u3055\u305B\u308B\u305F\u3081\u306B\u306F\u300E\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300F\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
368
+ "securityInstruction": "\u300C\u26A0\uFE0F\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\uFF1A\u5FC5\u8981\u300D\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u62E1\u5F35\u3092\u5236\u4F5C\u8005\u306E\u610F\u56F3\u3069\u304A\u308A\u306B\u52D5\u4F5C\u3055\u305B\u308B\u305F\u3081\u306B\u306F\u300E\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300F\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
369
369
  "catalogCancelDestination": "\u300E\u30AD\u30E3\u30F3\u30BB\u30EB\u300F\u3067\u9078\u629E\u4E00\u89A7\u306B\u623B\u308A\u307E\u3059\u3002",
370
370
  "selectionIntro": "\u8FFD\u52A0\u3059\u308B\u6A5F\u80FD\u62E1\u5F35\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002\u4F9D\u5B58\u3059\u308B\u6A5F\u80FD\u62E1\u5F35\u3082\u81EA\u52D5\u3067\u9078\u629E\u3055\u308C\u307E\u3059\u3002",
371
371
  "documentationFor": "{name}: \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8",
@@ -415,7 +415,7 @@ var messages = {
415
415
  "pending": "\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u4E2D\u2026",
416
416
  "failed": "\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F",
417
417
  "required": "\u3053\u306E\u62E1\u5F35\u306F\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u5185\u3067\u306F\u52D5\u4F5C\u3057\u307E\u305B\u3093\u3002\u300C\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300D\u3092\u9078\u3076\u304B\u3001\u300C\u30AD\u30E3\u30F3\u30BB\u30EB\u300D\u3067\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u3092\u4E2D\u6B62\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
418
- "requiredToRun": "\u52D5\u4F5C\u306B\u5FC5\u8981",
418
+ "requiredToRun": "\u5FC5\u8981",
419
419
  "unsupported": "\u975E\u5BFE\u5FDC",
420
420
  "choiceReset": "\u975E\u5BFE\u5FDC\u306E\u9078\u629E\u3092\u89E3\u9664\u3057\u307E\u3057\u305F\u3002\u5B9F\u884C\u65B9\u6CD5\u3092\u9078\u3073\u76F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
421
421
  "bulkNote": "\u305D\u306E\u30E2\u30FC\u30C9\u306B\u5BFE\u5FDC\u3059\u308B\u62E1\u5F35\u3060\u3051\u306B\u9069\u7528\u3057\u307E\u3059\u3002",
package/dist/react.cjs CHANGED
@@ -230,6 +230,7 @@ var style_names_default = {
230
230
  "error": "twextsec-error",
231
231
  "footer": "twextsec-footer",
232
232
  "securityFooter": "twextsec-security-footer",
233
+ "securityModes": "twextsec-security-modes",
233
234
  "footerControls": "twextsec-footer-controls",
234
235
  "previewColumn": "twextsec-preview-column",
235
236
  "packageHeading": "twextsec-package-heading",
@@ -455,7 +456,7 @@ var messages = {
455
456
  "pending": "Getting metadata\u2026",
456
457
  "failed": "Could not retrieve metadata",
457
458
  "required": "This extension cannot run inside the sandbox. Choose Without sandbox, or Cancel to stop loading the project.",
458
- "requiredToRun": "Required to run",
459
+ "requiredToRun": "Required",
459
460
  "unsupported": "Unsupported",
460
461
  "choiceReset": "The incompatible selection was cleared. Choose how to run this extension again.",
461
462
  "bulkNote": "Applies only to extensions that support this mode.",
@@ -475,7 +476,7 @@ var messages = {
475
476
  "warning": "Extensions without a sandbox can access your project and browser information."
476
477
  },
477
478
  "ja": {
478
- "securityInstruction": "\u26A0\uFE0F\u30DE\u30FC\u30AF\u306E\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u62E1\u5F35\u3092\u5236\u4F5C\u8005\u306E\u610F\u56F3\u3069\u304A\u308A\u306B\u52D5\u4F5C\u3055\u305B\u308B\u305F\u3081\u306B\u306F\u300E\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300F\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
479
+ "securityInstruction": "\u300C\u26A0\uFE0F\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\uFF1A\u5FC5\u8981\u300D\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u62E1\u5F35\u3092\u5236\u4F5C\u8005\u306E\u610F\u56F3\u3069\u304A\u308A\u306B\u52D5\u4F5C\u3055\u305B\u308B\u305F\u3081\u306B\u306F\u300E\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300F\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
479
480
  "catalogCancelDestination": "\u300E\u30AD\u30E3\u30F3\u30BB\u30EB\u300F\u3067\u9078\u629E\u4E00\u89A7\u306B\u623B\u308A\u307E\u3059\u3002",
480
481
  "selectionIntro": "\u8FFD\u52A0\u3059\u308B\u6A5F\u80FD\u62E1\u5F35\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002\u4F9D\u5B58\u3059\u308B\u6A5F\u80FD\u62E1\u5F35\u3082\u81EA\u52D5\u3067\u9078\u629E\u3055\u308C\u307E\u3059\u3002",
481
482
  "documentationFor": "{name}: \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8",
@@ -525,7 +526,7 @@ var messages = {
525
526
  "pending": "\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u4E2D\u2026",
526
527
  "failed": "\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F",
527
528
  "required": "\u3053\u306E\u62E1\u5F35\u306F\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u5185\u3067\u306F\u52D5\u4F5C\u3057\u307E\u305B\u3093\u3002\u300C\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300D\u3092\u9078\u3076\u304B\u3001\u300C\u30AD\u30E3\u30F3\u30BB\u30EB\u300D\u3067\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u3092\u4E2D\u6B62\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
528
- "requiredToRun": "\u52D5\u4F5C\u306B\u5FC5\u8981",
529
+ "requiredToRun": "\u5FC5\u8981",
529
530
  "unsupported": "\u975E\u5BFE\u5FDC",
530
531
  "choiceReset": "\u975E\u5BFE\u5FDC\u306E\u9078\u629E\u3092\u89E3\u9664\u3057\u307E\u3057\u305F\u3002\u5B9F\u884C\u65B9\u6CD5\u3092\u9078\u3073\u76F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
531
532
  "bulkNote": "\u305D\u306E\u30E2\u30FC\u30C9\u306B\u5BFE\u5FDC\u3059\u308B\u62E1\u5F35\u3060\u3051\u306B\u9069\u7528\u3057\u307E\u3059\u3002",
@@ -574,6 +575,12 @@ var externalURL = (value, protocols = ["https:"]) => {
574
575
  }
575
576
  };
576
577
  var PackageIcon = ({ service }) => service === "github" ? /* @__PURE__ */ import_react2.default.createElement("svg", { viewBox: "0 0 16 16", width: "22", height: "22", fill: "currentColor", "aria-hidden": "true", focusable: "false" }, /* @__PURE__ */ import_react2.default.createElement("path", { d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38l-.01-1.49c-2.23.48-2.69-1.08-2.69-1.08-.36-.92-.89-1.17-.89-1.17-.73-.5.06-.49.06-.49.8.06 1.22.82 1.22.82.71 1.22 1.87.87 2.33.67.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82A7.65 7.65 0 018 3.73c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48l-.01 2.33c0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z" })) : /* @__PURE__ */ import_react2.default.createElement("svg", { viewBox: "0 0 18 7", width: "30", height: "16", "aria-hidden": "true", focusable: "false" }, /* @__PURE__ */ import_react2.default.createElement("path", { fill: "#cb3837", d: "M0 0h18v6H9v1H5V6H0z" }), /* @__PURE__ */ import_react2.default.createElement("path", { fill: "#fff", d: "M1 1h4v4H4V2H3v3H1zm5 0h5v4H9v1H7V2H6zm2 1v2h1V2zm4-1h5v4h-1V2h-1v3h-1V2h-1v3h-1z" }));
578
+ var PackageRequirement = ({ metadata, locale, id }) => {
579
+ const t = (key, values) => formatMessage(locale, key, values);
580
+ const declared = typeof metadata.unsandboxed === "string" ? metadata.unsandboxed.trim().toLowerCase() : "";
581
+ const requirement = ["required", "optional", "not-needed"].includes(declared) ? declared : "unknown";
582
+ return /* @__PURE__ */ import_react2.default.createElement("div", { className: style_names_default.requirement, "data-requirement": requirement, id }, requirement === "required" && /* @__PURE__ */ import_react2.default.createElement("span", { "aria-hidden": "true" }, "\u26A0\uFE0F"), t("unsandboxedRequirement", { requirement: t(`requirement-${requirement}`) }));
583
+ };
577
584
  var PackageDescription = ({
578
585
  entry,
579
586
  metadata,
@@ -585,6 +592,7 @@ var PackageDescription = ({
585
592
  onImageError,
586
593
  idPrefix,
587
594
  requirementId,
595
+ showRequirement = true,
588
596
  linkCreator,
589
597
  showMissingMetadata,
590
598
  documentation,
@@ -595,8 +603,6 @@ var PackageDescription = ({
595
603
  const name = metadata.name || entry.ids.join(", ");
596
604
  const description = getExtensionDescription(metadata, locale);
597
605
  const candidates = getPackagePreviewCandidates(entry, sharedMetadata);
598
- const declared = typeof sharedMetadata.unsandboxed === "string" ? sharedMetadata.unsandboxed.trim().toLowerCase() : "";
599
- const requirement = ["required", "optional", "not-needed"].includes(declared) ? declared : "unknown";
600
606
  const docsURL = documentation && externalURL(metadata.docsURL);
601
607
  const authorURL = linkCreator && externalURL(metadata.authorURL, ["https:", "http:"]);
602
608
  const repositoryURL = externalURL(sharedMetadata.repository);
@@ -657,7 +663,7 @@ var PackageDescription = ({
657
663
  rel: "noopener noreferrer"
658
664
  },
659
665
  docsURL
660
- )), provenance, !status && /* @__PURE__ */ import_react2.default.createElement("div", { className: style_names_default.secondary }, t("pending")), status === "failed" && /* @__PURE__ */ import_react2.default.createElement("div", { className: style_names_default.error }, t("failed")), /* @__PURE__ */ import_react2.default.createElement("div", { className: style_names_default.requirement, "data-requirement": requirement, id: requirementId }, requirement === "required" && /* @__PURE__ */ import_react2.default.createElement("span", { "aria-hidden": "true" }, "\u26A0\uFE0F"), t("unsandboxedRequirement", { requirement: t(`requirement-${requirement}`) }))));
666
+ )), provenance, !status && /* @__PURE__ */ import_react2.default.createElement("div", { className: style_names_default.secondary }, t("pending")), status === "failed" && /* @__PURE__ */ import_react2.default.createElement("div", { className: style_names_default.error }, t("failed")), showRequirement && /* @__PURE__ */ import_react2.default.createElement(PackageRequirement, { metadata: sharedMetadata, locale, id: requirementId })));
661
667
  };
662
668
  var package_description_default = PackageDescription;
663
669
 
@@ -986,6 +992,7 @@ var ExtensionSecurityDialog = class extends import_react4.default.Component {
986
992
  index,
987
993
  idPrefix,
988
994
  requirementId: reasonId,
995
+ showRequirement: Boolean(selection),
989
996
  previewIndex: row.previewIndex,
990
997
  status: row.status,
991
998
  onImageError: this.handleImageError,
@@ -1002,7 +1009,7 @@ var ExtensionSecurityDialog = class extends import_react4.default.Component {
1002
1009
  },
1003
1010
  selection.dependencyReason
1004
1011
  ))
1005
- ), !selection && row.invalidated && !this.state.choices[entry.url] && /* @__PURE__ */ import_react4.default.createElement("div", { className: style_names_default.packageNotices }, /* @__PURE__ */ import_react4.default.createElement("div", { className: style_names_default.warningText, role: "status" }, this.t("choiceReset")))), !selection && MODES.map((mode) => /* @__PURE__ */ import_react4.default.createElement(
1012
+ ), !selection && row.invalidated && !this.state.choices[entry.url] && /* @__PURE__ */ import_react4.default.createElement("div", { className: style_names_default.packageNotices }, /* @__PURE__ */ import_react4.default.createElement("div", { className: style_names_default.warningText, role: "status" }, this.t("choiceReset")))), !selection && /* @__PURE__ */ import_react4.default.createElement("div", { className: style_names_default.securityModes }, /* @__PURE__ */ import_react4.default.createElement(PackageRequirement, { metadata: sharedMetadata, locale: this.props.locale, id: reasonId }), MODES.map((mode) => /* @__PURE__ */ import_react4.default.createElement(
1006
1013
  "label",
1007
1014
  {
1008
1015
  className: style_names_default.choice,
@@ -1028,7 +1035,7 @@ var ExtensionSecurityDialog = class extends import_react4.default.Component {
1028
1035
  /* @__PURE__ */ import_react4.default.createElement("span", { className: style_names_default.mobileLabel }, this.t(mode)),
1029
1036
  !this.canChoose(entry, mode) && /* @__PURE__ */ import_react4.default.createElement("span", { className: style_names_default.modeNote }, this.t("unsupported")),
1030
1037
  required && mode === "unsandboxed" && /* @__PURE__ */ import_react4.default.createElement("span", { id: requiredId, className: style_names_default.requiredMode }, this.t("requiredToRun"))
1031
- )), selection && /* @__PURE__ */ import_react4.default.createElement("label", { className: style_names_default.choice, "aria-disabled": selection.disabled }, /* @__PURE__ */ import_react4.default.createElement(
1038
+ ))), selection && /* @__PURE__ */ import_react4.default.createElement("label", { className: style_names_default.choice, "aria-disabled": selection.disabled }, /* @__PURE__ */ import_react4.default.createElement(
1032
1039
  "input",
1033
1040
  {
1034
1041
  type: "checkbox",
package/dist/react.mjs CHANGED
@@ -198,6 +198,7 @@ var style_names_default = {
198
198
  "error": "twextsec-error",
199
199
  "footer": "twextsec-footer",
200
200
  "securityFooter": "twextsec-security-footer",
201
+ "securityModes": "twextsec-security-modes",
201
202
  "footerControls": "twextsec-footer-controls",
202
203
  "previewColumn": "twextsec-preview-column",
203
204
  "packageHeading": "twextsec-package-heading",
@@ -423,7 +424,7 @@ var messages = {
423
424
  "pending": "Getting metadata\u2026",
424
425
  "failed": "Could not retrieve metadata",
425
426
  "required": "This extension cannot run inside the sandbox. Choose Without sandbox, or Cancel to stop loading the project.",
426
- "requiredToRun": "Required to run",
427
+ "requiredToRun": "Required",
427
428
  "unsupported": "Unsupported",
428
429
  "choiceReset": "The incompatible selection was cleared. Choose how to run this extension again.",
429
430
  "bulkNote": "Applies only to extensions that support this mode.",
@@ -443,7 +444,7 @@ var messages = {
443
444
  "warning": "Extensions without a sandbox can access your project and browser information."
444
445
  },
445
446
  "ja": {
446
- "securityInstruction": "\u26A0\uFE0F\u30DE\u30FC\u30AF\u306E\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u62E1\u5F35\u3092\u5236\u4F5C\u8005\u306E\u610F\u56F3\u3069\u304A\u308A\u306B\u52D5\u4F5C\u3055\u305B\u308B\u305F\u3081\u306B\u306F\u300E\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300F\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
447
+ "securityInstruction": "\u300C\u26A0\uFE0F\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\uFF1A\u5FC5\u8981\u300D\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u62E1\u5F35\u3092\u5236\u4F5C\u8005\u306E\u610F\u56F3\u3069\u304A\u308A\u306B\u52D5\u4F5C\u3055\u305B\u308B\u305F\u3081\u306B\u306F\u300E\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300F\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
447
448
  "catalogCancelDestination": "\u300E\u30AD\u30E3\u30F3\u30BB\u30EB\u300F\u3067\u9078\u629E\u4E00\u89A7\u306B\u623B\u308A\u307E\u3059\u3002",
448
449
  "selectionIntro": "\u8FFD\u52A0\u3059\u308B\u6A5F\u80FD\u62E1\u5F35\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002\u4F9D\u5B58\u3059\u308B\u6A5F\u80FD\u62E1\u5F35\u3082\u81EA\u52D5\u3067\u9078\u629E\u3055\u308C\u307E\u3059\u3002",
449
450
  "documentationFor": "{name}: \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8",
@@ -493,7 +494,7 @@ var messages = {
493
494
  "pending": "\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u4E2D\u2026",
494
495
  "failed": "\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F",
495
496
  "required": "\u3053\u306E\u62E1\u5F35\u306F\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u5185\u3067\u306F\u52D5\u4F5C\u3057\u307E\u305B\u3093\u3002\u300C\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u300D\u3092\u9078\u3076\u304B\u3001\u300C\u30AD\u30E3\u30F3\u30BB\u30EB\u300D\u3067\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u3092\u4E2D\u6B62\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
496
- "requiredToRun": "\u52D5\u4F5C\u306B\u5FC5\u8981",
497
+ "requiredToRun": "\u5FC5\u8981",
497
498
  "unsupported": "\u975E\u5BFE\u5FDC",
498
499
  "choiceReset": "\u975E\u5BFE\u5FDC\u306E\u9078\u629E\u3092\u89E3\u9664\u3057\u307E\u3057\u305F\u3002\u5B9F\u884C\u65B9\u6CD5\u3092\u9078\u3073\u76F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
499
500
  "bulkNote": "\u305D\u306E\u30E2\u30FC\u30C9\u306B\u5BFE\u5FDC\u3059\u308B\u62E1\u5F35\u3060\u3051\u306B\u9069\u7528\u3057\u307E\u3059\u3002",
@@ -542,6 +543,12 @@ var externalURL = (value, protocols = ["https:"]) => {
542
543
  }
543
544
  };
544
545
  var PackageIcon = ({ service }) => service === "github" ? /* @__PURE__ */ React2.createElement("svg", { viewBox: "0 0 16 16", width: "22", height: "22", fill: "currentColor", "aria-hidden": "true", focusable: "false" }, /* @__PURE__ */ React2.createElement("path", { d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38l-.01-1.49c-2.23.48-2.69-1.08-2.69-1.08-.36-.92-.89-1.17-.89-1.17-.73-.5.06-.49.06-.49.8.06 1.22.82 1.22.82.71 1.22 1.87.87 2.33.67.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82A7.65 7.65 0 018 3.73c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48l-.01 2.33c0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z" })) : /* @__PURE__ */ React2.createElement("svg", { viewBox: "0 0 18 7", width: "30", height: "16", "aria-hidden": "true", focusable: "false" }, /* @__PURE__ */ React2.createElement("path", { fill: "#cb3837", d: "M0 0h18v6H9v1H5V6H0z" }), /* @__PURE__ */ React2.createElement("path", { fill: "#fff", d: "M1 1h4v4H4V2H3v3H1zm5 0h5v4H9v1H7V2H6zm2 1v2h1V2zm4-1h5v4h-1V2h-1v3h-1V2h-1v3h-1z" }));
546
+ var PackageRequirement = ({ metadata, locale, id }) => {
547
+ const t = (key, values) => formatMessage(locale, key, values);
548
+ const declared = typeof metadata.unsandboxed === "string" ? metadata.unsandboxed.trim().toLowerCase() : "";
549
+ const requirement = ["required", "optional", "not-needed"].includes(declared) ? declared : "unknown";
550
+ return /* @__PURE__ */ React2.createElement("div", { className: style_names_default.requirement, "data-requirement": requirement, id }, requirement === "required" && /* @__PURE__ */ React2.createElement("span", { "aria-hidden": "true" }, "\u26A0\uFE0F"), t("unsandboxedRequirement", { requirement: t(`requirement-${requirement}`) }));
551
+ };
545
552
  var PackageDescription = ({
546
553
  entry,
547
554
  metadata,
@@ -553,6 +560,7 @@ var PackageDescription = ({
553
560
  onImageError,
554
561
  idPrefix,
555
562
  requirementId,
563
+ showRequirement = true,
556
564
  linkCreator,
557
565
  showMissingMetadata,
558
566
  documentation,
@@ -563,8 +571,6 @@ var PackageDescription = ({
563
571
  const name = metadata.name || entry.ids.join(", ");
564
572
  const description = getExtensionDescription(metadata, locale);
565
573
  const candidates = getPackagePreviewCandidates(entry, sharedMetadata);
566
- const declared = typeof sharedMetadata.unsandboxed === "string" ? sharedMetadata.unsandboxed.trim().toLowerCase() : "";
567
- const requirement = ["required", "optional", "not-needed"].includes(declared) ? declared : "unknown";
568
574
  const docsURL = documentation && externalURL(metadata.docsURL);
569
575
  const authorURL = linkCreator && externalURL(metadata.authorURL, ["https:", "http:"]);
570
576
  const repositoryURL = externalURL(sharedMetadata.repository);
@@ -625,7 +631,7 @@ var PackageDescription = ({
625
631
  rel: "noopener noreferrer"
626
632
  },
627
633
  docsURL
628
- )), provenance, !status && /* @__PURE__ */ React2.createElement("div", { className: style_names_default.secondary }, t("pending")), status === "failed" && /* @__PURE__ */ React2.createElement("div", { className: style_names_default.error }, t("failed")), /* @__PURE__ */ React2.createElement("div", { className: style_names_default.requirement, "data-requirement": requirement, id: requirementId }, requirement === "required" && /* @__PURE__ */ React2.createElement("span", { "aria-hidden": "true" }, "\u26A0\uFE0F"), t("unsandboxedRequirement", { requirement: t(`requirement-${requirement}`) }))));
634
+ )), provenance, !status && /* @__PURE__ */ React2.createElement("div", { className: style_names_default.secondary }, t("pending")), status === "failed" && /* @__PURE__ */ React2.createElement("div", { className: style_names_default.error }, t("failed")), showRequirement && /* @__PURE__ */ React2.createElement(PackageRequirement, { metadata: sharedMetadata, locale, id: requirementId })));
629
635
  };
630
636
  var package_description_default = PackageDescription;
631
637
 
@@ -954,6 +960,7 @@ var ExtensionSecurityDialog = class extends React4.Component {
954
960
  index,
955
961
  idPrefix,
956
962
  requirementId: reasonId,
963
+ showRequirement: Boolean(selection),
957
964
  previewIndex: row.previewIndex,
958
965
  status: row.status,
959
966
  onImageError: this.handleImageError,
@@ -970,7 +977,7 @@ var ExtensionSecurityDialog = class extends React4.Component {
970
977
  },
971
978
  selection.dependencyReason
972
979
  ))
973
- ), !selection && row.invalidated && !this.state.choices[entry.url] && /* @__PURE__ */ React4.createElement("div", { className: style_names_default.packageNotices }, /* @__PURE__ */ React4.createElement("div", { className: style_names_default.warningText, role: "status" }, this.t("choiceReset")))), !selection && MODES.map((mode) => /* @__PURE__ */ React4.createElement(
980
+ ), !selection && row.invalidated && !this.state.choices[entry.url] && /* @__PURE__ */ React4.createElement("div", { className: style_names_default.packageNotices }, /* @__PURE__ */ React4.createElement("div", { className: style_names_default.warningText, role: "status" }, this.t("choiceReset")))), !selection && /* @__PURE__ */ React4.createElement("div", { className: style_names_default.securityModes }, /* @__PURE__ */ React4.createElement(PackageRequirement, { metadata: sharedMetadata, locale: this.props.locale, id: reasonId }), MODES.map((mode) => /* @__PURE__ */ React4.createElement(
974
981
  "label",
975
982
  {
976
983
  className: style_names_default.choice,
@@ -996,7 +1003,7 @@ var ExtensionSecurityDialog = class extends React4.Component {
996
1003
  /* @__PURE__ */ React4.createElement("span", { className: style_names_default.mobileLabel }, this.t(mode)),
997
1004
  !this.canChoose(entry, mode) && /* @__PURE__ */ React4.createElement("span", { className: style_names_default.modeNote }, this.t("unsupported")),
998
1005
  required && mode === "unsandboxed" && /* @__PURE__ */ React4.createElement("span", { id: requiredId, className: style_names_default.requiredMode }, this.t("requiredToRun"))
999
- )), selection && /* @__PURE__ */ React4.createElement("label", { className: style_names_default.choice, "aria-disabled": selection.disabled }, /* @__PURE__ */ React4.createElement(
1006
+ ))), selection && /* @__PURE__ */ React4.createElement("label", { className: style_names_default.choice, "aria-disabled": selection.disabled }, /* @__PURE__ */ React4.createElement(
1000
1007
  "input",
1001
1008
  {
1002
1009
  type: "checkbox",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-extension-security-dialog",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Batch extension security review, previews and per-project defaults for TurboWarp hosts",
5
5
  "type": "module",
6
6
  "author": {
package/styles.css CHANGED
@@ -27,7 +27,9 @@
27
27
  .twextsec-list { padding: 0 20px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
28
28
  .twextsec-row { border-bottom: 1px solid var(--ui-black-transparent, #dce1eb); }
29
29
  .twextsec-row:last-child { border-bottom: 0; }
30
- .twextsec-row-main { padding: 16px 0; }
30
+ .twextsec-row-main { padding: 16px 0; grid-template-columns: minmax(0, 1fr) auto; }
31
+ .twextsec-security-modes { display: grid; grid-template-columns: 52px 94px 94px; gap: 8px; align-items: center; min-width: 0; }
32
+ .twextsec-security-modes > .twextsec-requirement { grid-column: 1 / -1; justify-self: start; }
31
33
  .twextsec-package-column { min-width: 0; }
32
34
  .twextsec-package-notices { margin-top: 6px; font-size: 12px; overflow-wrap: anywhere; }
33
35
  .twextsec-metadata { display: grid; grid-template-columns: 128px minmax(0,1fr); gap: 12px; align-items: start; min-width: 0; }
@@ -71,12 +73,15 @@
71
73
  .twextsec-confirmation p { margin: 0 0 24px; line-height: 1.6; }
72
74
  @media (max-width: 720px) {
73
75
  .twextsec-metadata { grid-template-columns: 100px minmax(0,1fr); }
74
- .twextsec-columns, .twextsec-row-main { grid-template-columns: minmax(0,1fr) 44px 74px 74px; gap: 6px; }
76
+ .twextsec-columns { grid-template-columns: minmax(0,1fr) 44px 74px 74px; gap: 6px; }
77
+ .twextsec-row-main { gap: 6px; }
78
+ .twextsec-security-modes { grid-template-columns: 44px 74px 74px; gap: 6px; }
75
79
  }
76
80
  @media (max-width: 580px) {
77
81
  .twextsec-modal { margin: 12px auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
78
82
  .twextsec-columns { display: none; }
79
- .twextsec-row-main { grid-template-columns: repeat(3,minmax(0,1fr)); }
83
+ .twextsec-row-main { grid-template-columns: minmax(0,1fr); }
84
+ .twextsec-security-modes { grid-template-columns: repeat(3,minmax(0,1fr)); }
80
85
  .twextsec-package-column { grid-column: 1 / -1; }
81
86
  .twextsec-metadata { grid-template-columns: 84px minmax(0,1fr); gap: 8px; }
82
87
  .twextsec-choice { grid-row: 2; flex-direction: column; padding: 6px 2px; }
package/webpack4.css CHANGED
@@ -27,7 +27,9 @@
27
27
  :global(.twextsec-list) { padding: 0 20px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
28
28
  :global(.twextsec-row) { border-bottom: 1px solid var(--ui-black-transparent, #dce1eb); }
29
29
  :global(.twextsec-row):last-child { border-bottom: 0; }
30
- :global(.twextsec-row-main) { padding: 16px 0; }
30
+ :global(.twextsec-row-main) { padding: 16px 0; grid-template-columns: minmax(0, 1fr) auto; }
31
+ :global(.twextsec-security-modes) { display: grid; grid-template-columns: 52px 94px 94px; gap: 8px; align-items: center; min-width: 0; }
32
+ :global(.twextsec-security-modes) > :global(.twextsec-requirement) { grid-column: 1 / -1; justify-self: start; }
31
33
  :global(.twextsec-package-column) { min-width: 0; }
32
34
  :global(.twextsec-package-notices) { margin-top: 6px; font-size: 12px; overflow-wrap: anywhere; }
33
35
  :global(.twextsec-metadata) { display: grid; grid-template-columns: 128px minmax(0,1fr); gap: 12px; align-items: start; min-width: 0; }
@@ -71,12 +73,15 @@
71
73
  :global(.twextsec-confirmation) p { margin: 0 0 24px; line-height: 1.6; }
72
74
  @media (max-width: 720px) {
73
75
  :global(.twextsec-metadata) { grid-template-columns: 100px minmax(0,1fr); }
74
- :global(.twextsec-columns), :global(.twextsec-row-main) { grid-template-columns: minmax(0,1fr) 44px 74px 74px; gap: 6px; }
76
+ :global(.twextsec-columns) { grid-template-columns: minmax(0,1fr) 44px 74px 74px; gap: 6px; }
77
+ :global(.twextsec-row-main) { gap: 6px; }
78
+ :global(.twextsec-security-modes) { grid-template-columns: 44px 74px 74px; gap: 6px; }
75
79
  }
76
80
  @media (max-width: 580px) {
77
81
  :global(.twextsec-modal) { margin: 12px auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
78
82
  :global(.twextsec-columns) { display: none; }
79
- :global(.twextsec-row-main) { grid-template-columns: repeat(3,minmax(0,1fr)); }
83
+ :global(.twextsec-row-main) { grid-template-columns: minmax(0,1fr); }
84
+ :global(.twextsec-security-modes) { grid-template-columns: repeat(3,minmax(0,1fr)); }
80
85
  :global(.twextsec-package-column) { grid-column: 1 / -1; }
81
86
  :global(.twextsec-metadata) { grid-template-columns: 84px minmax(0,1fr); gap: 8px; }
82
87
  :global(.twextsec-choice) { grid-row: 2; flex-direction: column; padding: 6px 2px; }