@kubohiroya/turbowarp-extension-security-dialog 0.5.0 → 0.5.2
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/NOTICE.md +6 -0
- package/dist/index.cjs +99 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.mjs +99 -3
- package/dist/react.cjs +7 -1
- package/dist/react.mjs +7 -1
- package/package.json +1 -1
- package/styles.css +1 -0
- package/webpack4.css +1 -0
package/NOTICE.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Image attribution
|
|
2
2
|
|
|
3
|
+
## common.svg
|
|
4
|
+
|
|
5
|
+
Original to this package: a jigsaw piece outline with a serif T, drawn for it and derived from no
|
|
6
|
+
other work. It is embedded into `dist` as a base64 data URI by `scripts/build.mjs`, so it ships in
|
|
7
|
+
the published package. It replaced an earlier icon whose origin was not recorded.
|
|
8
|
+
|
|
3
9
|
## custom.svg
|
|
4
10
|
|
|
5
11
|
{ } characters from https://github.com/jesseweed/seti-ui/blob/master/icons/json.svg under the MIT License:
|
package/dist/index.cjs
CHANGED
|
@@ -43,6 +43,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
43
43
|
// src/index.js
|
|
44
44
|
var index_exports = {};
|
|
45
45
|
__export(index_exports, {
|
|
46
|
+
createExtensionWaitDialog: () => createExtensionWaitDialog,
|
|
46
47
|
decodeExtensionDataURL: () => decodeExtensionDataURL,
|
|
47
48
|
encodeChoices: () => encodeChoices,
|
|
48
49
|
fingerprint: () => fingerprint,
|
|
@@ -231,8 +232,8 @@ var import_jszip = __toESM(require("@turbowarp/jszip"), 1);
|
|
|
231
232
|
var DATABASE = "tw-extension-security";
|
|
232
233
|
var STORE = "project-preferences";
|
|
233
234
|
var validMode = (mode) => ["deny", "sandboxed", "unsandboxed"].includes(mode);
|
|
234
|
-
var fingerprint = async (
|
|
235
|
-
const bytes = new _TextEncoder().encode(
|
|
235
|
+
var fingerprint = async (text2) => {
|
|
236
|
+
const bytes = new _TextEncoder().encode(text2);
|
|
236
237
|
const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
|
|
237
238
|
return Array.from(new Uint8Array(digest), (value) => value.toString(16).padStart(2, "0")).join("");
|
|
238
239
|
};
|
|
@@ -420,6 +421,9 @@ var messages = {
|
|
|
420
421
|
"source": "Source code",
|
|
421
422
|
"sourceFailed": "Could not retrieve source code.",
|
|
422
423
|
"preview": "Preview for {name}",
|
|
424
|
+
"fetchWaitTitle": "Fetching an extension",
|
|
425
|
+
"fetchWaitRetry": "Could not connect. Trying again ({attempt}/{attempts})",
|
|
426
|
+
"fetchWaitNote": "This takes a few seconds. If it keeps failing, loading stops and the project you had open is restored.",
|
|
423
427
|
"warning": "Extensions without a sandbox can access your project and browser information."
|
|
424
428
|
},
|
|
425
429
|
"ja": {
|
|
@@ -499,6 +503,9 @@ var messages = {
|
|
|
499
503
|
"source": "\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9",
|
|
500
504
|
"sourceFailed": "\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
501
505
|
"preview": "{name} \u306E\u30D7\u30EC\u30D3\u30E5\u30FC",
|
|
506
|
+
"fetchWaitTitle": "\u6A5F\u80FD\u62E1\u5F35\u3092\u53D6\u5F97\u3057\u3066\u3044\u307E\u3059",
|
|
507
|
+
"fetchWaitRetry": "\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u518D\u8A66\u884C\u3057\u3066\u3044\u307E\u3059\uFF08{attempt}/{attempts}\uFF09",
|
|
508
|
+
"fetchWaitNote": "\u6570\u79D2\u3067\u7D42\u308F\u308A\u307E\u3059\u3002\u305D\u308C\u3067\u3082\u53D6\u5F97\u3067\u304D\u306A\u3044\u5834\u5408\u306F\u8AAD\u307F\u8FBC\u307F\u3092\u4E2D\u6B62\u3057\u3001\u958B\u3044\u3066\u3044\u305F\u4F5C\u54C1\u306B\u623B\u3057\u307E\u3059\u3002",
|
|
502
509
|
"warning": "\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u306E\u62E1\u5F35\u306F\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3084\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u60C5\u5831\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u3059\u3002"
|
|
503
510
|
}
|
|
504
511
|
};
|
|
@@ -508,6 +515,95 @@ var formatMessage = (locale, key, values = {}) => {
|
|
|
508
515
|
return template.replace(/\{(\w+)\}/g, (match, name) => String(values[name] === void 0 ? match : values[name]));
|
|
509
516
|
};
|
|
510
517
|
|
|
518
|
+
// src/wait-dialog.js
|
|
519
|
+
var styles = ".twextsec-wait{position:fixed;left:50vw;top:50vh;right:auto;bottom:auto;margin:0;transform:translate(-50%,-50%);box-sizing:border-box;width:min(440px,calc(100vw - 32px));border:1px solid var(--ui-black-transparent,#0000001a);border-radius:12px;padding:20px 24px;color:var(--ui-modal-foreground,#263145);background:var(--ui-modal-background,#fff);box-shadow:0 16px 48px #0000004d;font:inherit}.twextsec-wait::backdrop{background:#111827a6}.twextsec-wait:focus,.twextsec-wait:focus-visible{outline:none}.twextsec-wait h2{margin:0 0 10px;font-size:1.05em}.twextsec-wait p{margin:0 0 8px}.twextsec-wait-source{overflow-wrap:anywhere;font-size:.85em;opacity:.7}.twextsec-wait-note{margin-bottom:0;font-size:.9em;opacity:.8}";
|
|
520
|
+
var injectStyles = (document) => {
|
|
521
|
+
if (!document.head || document.querySelector("[data-twextsec-wait-style]")) return;
|
|
522
|
+
const element = document.createElement("style");
|
|
523
|
+
element.setAttribute("data-twextsec-wait-style", "");
|
|
524
|
+
element.textContent = styles;
|
|
525
|
+
document.head.appendChild(element);
|
|
526
|
+
};
|
|
527
|
+
var text = (document, tag, value, className) => {
|
|
528
|
+
const element = document.createElement(tag);
|
|
529
|
+
element.textContent = value;
|
|
530
|
+
if (className) element.className = className;
|
|
531
|
+
return element;
|
|
532
|
+
};
|
|
533
|
+
function createExtensionWaitDialog(document, locale = "en", { delayMs = 300 } = {}) {
|
|
534
|
+
let dialog = null;
|
|
535
|
+
let timer = null;
|
|
536
|
+
let latest = null;
|
|
537
|
+
let disposed = false;
|
|
538
|
+
const label = (key) => formatMessage(locale, key, latest || {});
|
|
539
|
+
const render = () => {
|
|
540
|
+
if (!dialog) return;
|
|
541
|
+
dialog.querySelector('[data-twextsec-wait="attempt"]').textContent = label("fetchWaitRetry");
|
|
542
|
+
dialog.querySelector('[data-twextsec-wait="source"]').textContent = latest.url || "";
|
|
543
|
+
};
|
|
544
|
+
const open = () => {
|
|
545
|
+
timer = null;
|
|
546
|
+
if (disposed || dialog || !document || !document.body) return;
|
|
547
|
+
injectStyles(document);
|
|
548
|
+
dialog = document.createElement("dialog");
|
|
549
|
+
dialog.className = "twextsec-wait";
|
|
550
|
+
dialog.setAttribute("data-testid", "twextsec-wait");
|
|
551
|
+
dialog.setAttribute("aria-live", "polite");
|
|
552
|
+
dialog.appendChild(text(document, "h2", formatMessage(locale, "fetchWaitTitle")));
|
|
553
|
+
const attempt = text(document, "p", "");
|
|
554
|
+
attempt.setAttribute("data-twextsec-wait", "attempt");
|
|
555
|
+
const source = text(document, "p", "", "twextsec-wait-source");
|
|
556
|
+
source.setAttribute("data-twextsec-wait", "source");
|
|
557
|
+
dialog.append(
|
|
558
|
+
attempt,
|
|
559
|
+
source,
|
|
560
|
+
text(document, "p", formatMessage(locale, "fetchWaitNote"), "twextsec-wait-note")
|
|
561
|
+
);
|
|
562
|
+
dialog.addEventListener("cancel", (event) => event.preventDefault());
|
|
563
|
+
document.body.appendChild(dialog);
|
|
564
|
+
render();
|
|
565
|
+
try {
|
|
566
|
+
if (typeof dialog.showModal === "function") dialog.showModal();
|
|
567
|
+
} catch (error) {
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
return Object.freeze({
|
|
571
|
+
/**
|
|
572
|
+
* Report the attempt now being waited for, opening the dialog once the wait looks real.
|
|
573
|
+
* @param {object} info The url, the attempt it leads to, and how many there are in all.
|
|
574
|
+
* @returns {void}
|
|
575
|
+
*/
|
|
576
|
+
show(info) {
|
|
577
|
+
if (disposed) return;
|
|
578
|
+
latest = info || {};
|
|
579
|
+
if (dialog) render();
|
|
580
|
+
else if (timer === null) timer = setTimeout(open, delayMs);
|
|
581
|
+
},
|
|
582
|
+
/**
|
|
583
|
+
* Take it down: the fetch resolved, one way or the other.
|
|
584
|
+
* @returns {void}
|
|
585
|
+
*/
|
|
586
|
+
hide() {
|
|
587
|
+
if (timer !== null) {
|
|
588
|
+
clearTimeout(timer);
|
|
589
|
+
timer = null;
|
|
590
|
+
}
|
|
591
|
+
latest = null;
|
|
592
|
+
if (!dialog) return;
|
|
593
|
+
try {
|
|
594
|
+
dialog.close();
|
|
595
|
+
} catch (error) {
|
|
596
|
+
}
|
|
597
|
+
dialog.remove();
|
|
598
|
+
dialog = null;
|
|
599
|
+
},
|
|
600
|
+
dispose() {
|
|
601
|
+
disposed = true;
|
|
602
|
+
this.hide();
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
|
|
511
607
|
// src/selection.js
|
|
512
608
|
var httpsURL = (value) => {
|
|
513
609
|
if (typeof value !== "string" || !value.trim()) throw new Error("Expected an HTTPS URL");
|
|
@@ -611,7 +707,7 @@ var parseExtensionCatalog = (data) => {
|
|
|
611
707
|
if (typeof item[field] === "string") metadata[field] = item[field];
|
|
612
708
|
}
|
|
613
709
|
if (item.descriptions && typeof item.descriptions === "object") {
|
|
614
|
-
metadata.descriptions = Object.fromEntries(Object.entries(item.descriptions).filter(([locale,
|
|
710
|
+
metadata.descriptions = Object.fromEntries(Object.entries(item.descriptions).filter(([locale, text2]) => /^[a-z]{2,8}(?:-[a-z0-9]{1,8})*$/.test(locale) && typeof text2 === "string"));
|
|
615
711
|
}
|
|
616
712
|
if (item.banner) metadata.banner = httpsURL(item.banner);
|
|
617
713
|
if (item.repository) metadata.repository = httpsURL(item.repository);
|
package/dist/index.d.ts
CHANGED
|
@@ -41,3 +41,9 @@ export interface ExtensionSelection {
|
|
|
41
41
|
export function resolveExtensionSelection(entries: SelectableExtension[], explicitIds?: Iterable<string>, loadedIds?: Iterable<string>): ExtensionSelection;
|
|
42
42
|
export function parseExtensionCatalog(data: unknown): SelectableExtension[];
|
|
43
43
|
export function loadExtensionCatalog(url: string, signal?: AbortSignal): Promise<SelectableExtension[]>;
|
|
44
|
+
export interface ExtensionWaitDialog {
|
|
45
|
+
show(info: {url?: string; attempt: number; attempts: number}): void;
|
|
46
|
+
hide(): void;
|
|
47
|
+
dispose(): void;
|
|
48
|
+
}
|
|
49
|
+
export function createExtensionWaitDialog(document: Document, locale?: string, options?: {delayMs?: number}): ExtensionWaitDialog;
|
package/dist/index.mjs
CHANGED
|
@@ -182,8 +182,8 @@ import JSZip from "@turbowarp/jszip";
|
|
|
182
182
|
var DATABASE = "tw-extension-security";
|
|
183
183
|
var STORE = "project-preferences";
|
|
184
184
|
var validMode = (mode) => ["deny", "sandboxed", "unsandboxed"].includes(mode);
|
|
185
|
-
var fingerprint = async (
|
|
186
|
-
const bytes = new _TextEncoder().encode(
|
|
185
|
+
var fingerprint = async (text2) => {
|
|
186
|
+
const bytes = new _TextEncoder().encode(text2);
|
|
187
187
|
const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
|
|
188
188
|
return Array.from(new Uint8Array(digest), (value) => value.toString(16).padStart(2, "0")).join("");
|
|
189
189
|
};
|
|
@@ -371,6 +371,9 @@ var messages = {
|
|
|
371
371
|
"source": "Source code",
|
|
372
372
|
"sourceFailed": "Could not retrieve source code.",
|
|
373
373
|
"preview": "Preview for {name}",
|
|
374
|
+
"fetchWaitTitle": "Fetching an extension",
|
|
375
|
+
"fetchWaitRetry": "Could not connect. Trying again ({attempt}/{attempts})",
|
|
376
|
+
"fetchWaitNote": "This takes a few seconds. If it keeps failing, loading stops and the project you had open is restored.",
|
|
374
377
|
"warning": "Extensions without a sandbox can access your project and browser information."
|
|
375
378
|
},
|
|
376
379
|
"ja": {
|
|
@@ -450,6 +453,9 @@ var messages = {
|
|
|
450
453
|
"source": "\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9",
|
|
451
454
|
"sourceFailed": "\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
452
455
|
"preview": "{name} \u306E\u30D7\u30EC\u30D3\u30E5\u30FC",
|
|
456
|
+
"fetchWaitTitle": "\u6A5F\u80FD\u62E1\u5F35\u3092\u53D6\u5F97\u3057\u3066\u3044\u307E\u3059",
|
|
457
|
+
"fetchWaitRetry": "\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u518D\u8A66\u884C\u3057\u3066\u3044\u307E\u3059\uFF08{attempt}/{attempts}\uFF09",
|
|
458
|
+
"fetchWaitNote": "\u6570\u79D2\u3067\u7D42\u308F\u308A\u307E\u3059\u3002\u305D\u308C\u3067\u3082\u53D6\u5F97\u3067\u304D\u306A\u3044\u5834\u5408\u306F\u8AAD\u307F\u8FBC\u307F\u3092\u4E2D\u6B62\u3057\u3001\u958B\u3044\u3066\u3044\u305F\u4F5C\u54C1\u306B\u623B\u3057\u307E\u3059\u3002",
|
|
453
459
|
"warning": "\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u306E\u62E1\u5F35\u306F\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3084\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u60C5\u5831\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u3059\u3002"
|
|
454
460
|
}
|
|
455
461
|
};
|
|
@@ -459,6 +465,95 @@ var formatMessage = (locale, key, values = {}) => {
|
|
|
459
465
|
return template.replace(/\{(\w+)\}/g, (match, name) => String(values[name] === void 0 ? match : values[name]));
|
|
460
466
|
};
|
|
461
467
|
|
|
468
|
+
// src/wait-dialog.js
|
|
469
|
+
var styles = ".twextsec-wait{position:fixed;left:50vw;top:50vh;right:auto;bottom:auto;margin:0;transform:translate(-50%,-50%);box-sizing:border-box;width:min(440px,calc(100vw - 32px));border:1px solid var(--ui-black-transparent,#0000001a);border-radius:12px;padding:20px 24px;color:var(--ui-modal-foreground,#263145);background:var(--ui-modal-background,#fff);box-shadow:0 16px 48px #0000004d;font:inherit}.twextsec-wait::backdrop{background:#111827a6}.twextsec-wait:focus,.twextsec-wait:focus-visible{outline:none}.twextsec-wait h2{margin:0 0 10px;font-size:1.05em}.twextsec-wait p{margin:0 0 8px}.twextsec-wait-source{overflow-wrap:anywhere;font-size:.85em;opacity:.7}.twextsec-wait-note{margin-bottom:0;font-size:.9em;opacity:.8}";
|
|
470
|
+
var injectStyles = (document) => {
|
|
471
|
+
if (!document.head || document.querySelector("[data-twextsec-wait-style]")) return;
|
|
472
|
+
const element = document.createElement("style");
|
|
473
|
+
element.setAttribute("data-twextsec-wait-style", "");
|
|
474
|
+
element.textContent = styles;
|
|
475
|
+
document.head.appendChild(element);
|
|
476
|
+
};
|
|
477
|
+
var text = (document, tag, value, className) => {
|
|
478
|
+
const element = document.createElement(tag);
|
|
479
|
+
element.textContent = value;
|
|
480
|
+
if (className) element.className = className;
|
|
481
|
+
return element;
|
|
482
|
+
};
|
|
483
|
+
function createExtensionWaitDialog(document, locale = "en", { delayMs = 300 } = {}) {
|
|
484
|
+
let dialog = null;
|
|
485
|
+
let timer = null;
|
|
486
|
+
let latest = null;
|
|
487
|
+
let disposed = false;
|
|
488
|
+
const label = (key) => formatMessage(locale, key, latest || {});
|
|
489
|
+
const render = () => {
|
|
490
|
+
if (!dialog) return;
|
|
491
|
+
dialog.querySelector('[data-twextsec-wait="attempt"]').textContent = label("fetchWaitRetry");
|
|
492
|
+
dialog.querySelector('[data-twextsec-wait="source"]').textContent = latest.url || "";
|
|
493
|
+
};
|
|
494
|
+
const open = () => {
|
|
495
|
+
timer = null;
|
|
496
|
+
if (disposed || dialog || !document || !document.body) return;
|
|
497
|
+
injectStyles(document);
|
|
498
|
+
dialog = document.createElement("dialog");
|
|
499
|
+
dialog.className = "twextsec-wait";
|
|
500
|
+
dialog.setAttribute("data-testid", "twextsec-wait");
|
|
501
|
+
dialog.setAttribute("aria-live", "polite");
|
|
502
|
+
dialog.appendChild(text(document, "h2", formatMessage(locale, "fetchWaitTitle")));
|
|
503
|
+
const attempt = text(document, "p", "");
|
|
504
|
+
attempt.setAttribute("data-twextsec-wait", "attempt");
|
|
505
|
+
const source = text(document, "p", "", "twextsec-wait-source");
|
|
506
|
+
source.setAttribute("data-twextsec-wait", "source");
|
|
507
|
+
dialog.append(
|
|
508
|
+
attempt,
|
|
509
|
+
source,
|
|
510
|
+
text(document, "p", formatMessage(locale, "fetchWaitNote"), "twextsec-wait-note")
|
|
511
|
+
);
|
|
512
|
+
dialog.addEventListener("cancel", (event) => event.preventDefault());
|
|
513
|
+
document.body.appendChild(dialog);
|
|
514
|
+
render();
|
|
515
|
+
try {
|
|
516
|
+
if (typeof dialog.showModal === "function") dialog.showModal();
|
|
517
|
+
} catch (error) {
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
return Object.freeze({
|
|
521
|
+
/**
|
|
522
|
+
* Report the attempt now being waited for, opening the dialog once the wait looks real.
|
|
523
|
+
* @param {object} info The url, the attempt it leads to, and how many there are in all.
|
|
524
|
+
* @returns {void}
|
|
525
|
+
*/
|
|
526
|
+
show(info) {
|
|
527
|
+
if (disposed) return;
|
|
528
|
+
latest = info || {};
|
|
529
|
+
if (dialog) render();
|
|
530
|
+
else if (timer === null) timer = setTimeout(open, delayMs);
|
|
531
|
+
},
|
|
532
|
+
/**
|
|
533
|
+
* Take it down: the fetch resolved, one way or the other.
|
|
534
|
+
* @returns {void}
|
|
535
|
+
*/
|
|
536
|
+
hide() {
|
|
537
|
+
if (timer !== null) {
|
|
538
|
+
clearTimeout(timer);
|
|
539
|
+
timer = null;
|
|
540
|
+
}
|
|
541
|
+
latest = null;
|
|
542
|
+
if (!dialog) return;
|
|
543
|
+
try {
|
|
544
|
+
dialog.close();
|
|
545
|
+
} catch (error) {
|
|
546
|
+
}
|
|
547
|
+
dialog.remove();
|
|
548
|
+
dialog = null;
|
|
549
|
+
},
|
|
550
|
+
dispose() {
|
|
551
|
+
disposed = true;
|
|
552
|
+
this.hide();
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
|
|
462
557
|
// src/selection.js
|
|
463
558
|
var httpsURL = (value) => {
|
|
464
559
|
if (typeof value !== "string" || !value.trim()) throw new Error("Expected an HTTPS URL");
|
|
@@ -562,7 +657,7 @@ var parseExtensionCatalog = (data) => {
|
|
|
562
657
|
if (typeof item[field] === "string") metadata[field] = item[field];
|
|
563
658
|
}
|
|
564
659
|
if (item.descriptions && typeof item.descriptions === "object") {
|
|
565
|
-
metadata.descriptions = Object.fromEntries(Object.entries(item.descriptions).filter(([locale,
|
|
660
|
+
metadata.descriptions = Object.fromEntries(Object.entries(item.descriptions).filter(([locale, text2]) => /^[a-z]{2,8}(?:-[a-z0-9]{1,8})*$/.test(locale) && typeof text2 === "string"));
|
|
566
661
|
}
|
|
567
662
|
if (item.banner) metadata.banner = httpsURL(item.banner);
|
|
568
663
|
if (item.repository) metadata.repository = httpsURL(item.repository);
|
|
@@ -587,6 +682,7 @@ var loadExtensionCatalog = async (url, signal) => {
|
|
|
587
682
|
return parseExtensionCatalog(await response.json());
|
|
588
683
|
};
|
|
589
684
|
export {
|
|
685
|
+
createExtensionWaitDialog,
|
|
590
686
|
decodeExtensionDataURL,
|
|
591
687
|
encodeChoices,
|
|
592
688
|
fingerprint,
|
package/dist/react.cjs
CHANGED
|
@@ -486,6 +486,9 @@ var messages = {
|
|
|
486
486
|
"source": "Source code",
|
|
487
487
|
"sourceFailed": "Could not retrieve source code.",
|
|
488
488
|
"preview": "Preview for {name}",
|
|
489
|
+
"fetchWaitTitle": "Fetching an extension",
|
|
490
|
+
"fetchWaitRetry": "Could not connect. Trying again ({attempt}/{attempts})",
|
|
491
|
+
"fetchWaitNote": "This takes a few seconds. If it keeps failing, loading stops and the project you had open is restored.",
|
|
489
492
|
"warning": "Extensions without a sandbox can access your project and browser information."
|
|
490
493
|
},
|
|
491
494
|
"ja": {
|
|
@@ -565,6 +568,9 @@ var messages = {
|
|
|
565
568
|
"source": "\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9",
|
|
566
569
|
"sourceFailed": "\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
567
570
|
"preview": "{name} \u306E\u30D7\u30EC\u30D3\u30E5\u30FC",
|
|
571
|
+
"fetchWaitTitle": "\u6A5F\u80FD\u62E1\u5F35\u3092\u53D6\u5F97\u3057\u3066\u3044\u307E\u3059",
|
|
572
|
+
"fetchWaitRetry": "\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u518D\u8A66\u884C\u3057\u3066\u3044\u307E\u3059\uFF08{attempt}/{attempts}\uFF09",
|
|
573
|
+
"fetchWaitNote": "\u6570\u79D2\u3067\u7D42\u308F\u308A\u307E\u3059\u3002\u305D\u308C\u3067\u3082\u53D6\u5F97\u3067\u304D\u306A\u3044\u5834\u5408\u306F\u8AAD\u307F\u8FBC\u307F\u3092\u4E2D\u6B62\u3057\u3001\u958B\u3044\u3066\u3044\u305F\u4F5C\u54C1\u306B\u623B\u3057\u307E\u3059\u3002",
|
|
568
574
|
"warning": "\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u306E\u62E1\u5F35\u306F\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3084\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u60C5\u5831\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u3059\u3002"
|
|
569
575
|
}
|
|
570
576
|
};
|
|
@@ -575,7 +581,7 @@ var formatMessage = (locale, key, values = {}) => {
|
|
|
575
581
|
};
|
|
576
582
|
|
|
577
583
|
// src/package-description.jsx
|
|
578
|
-
var commonBanner = "data:image/svg+xml;base64,
|
|
584
|
+
var commonBanner = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIiB2aWV3Qm94PSIwIDAgMzAwIDMwMCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJUdXJib1dhcnAtUGx1cyBleHRlbnNpb24iPjx0aXRsZT5UdXJib1dhcnAtUGx1cyBleHRlbnNpb248L3RpdGxlPjxwYXRoIGZpbGw9IiMwZmJkOGMiIGQ9Ik0zMyA4MkM1NSA3OCA4NCA3OSAxMDYgODJDMTA2IDY3IDkwIDY5IDkwIDU0QzkwIDMyIDE3NCAzMCAxNzQgNTRDMTc0IDY5IDE1OCA2NiAxNTggODJDMTc1IDg2IDE5NiA4NSAyMTMgODJDMjE3IDk5IDIxNiAxMTUgMjEzIDEzMEMyMzAgMTMwIDIyNyAxMTQgMjQ1IDExNEMyNzEgMTE0IDI2OSAyMDYgMjQ1IDIwNkMyMjcgMjA2IDIzMCAxOTAgMjEzIDE5MEMyMDkgMjEwIDIxMCAyNDAgMjEzIDI2MkMyMDMgMjY1IDE4OCAyNjYgMTc0IDI2MkMxNzQgMjQ4IDE4OCAyNTAgMTg4IDIzNkMxODggMjE2IDExMiAyMTQgMTEyIDIzNkMxMTIgMjUwIDEyNiAyNDcgMTI2IDI2MkMxMDggMjU4IDYwIDI1OSAzMyAyNjJDMjkgMjQ1IDMwIDIyNSAzMyAyMDlDNDkgMjA5IDQ2IDIyNSA2MiAyMjVDODYgMjI1IDg0IDEzNyA2MiAxMzdDNDYgMTM3IDQ5IDE1MyAzMyAxNTNDMzcgMTMzIDM2IDEwNSAzMyA4MloiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNOTMuNyAxMDBMMjAxLjcgMTAwTDE5OS45IDEyNkwxODkuOSAxMjZDMTkwLjMgMTIwIDE4OC45IDExMiAxODUuMSAxMDlMMTU5LjEgMTA5TDE1My4xIDE5NEMxNTIuNSAyMDMgMTU3LjMgMjA2IDE2OC4yIDIwN0wxNjggMjEwTDExMiAyMTBMMTEyLjIgMjA3QzEyMy4zIDIwNiAxMjguNSAyMDMgMTI5LjEgMTk0TDEzNS4xIDEwOUwxMDkuMSAxMDlDMTA0LjkgMTEyIDEwMi4zIDEyMCAxMDEuOSAxMjZMOTEuOSAxMjZaIi8+PC9zdmc+Cg==";
|
|
579
585
|
var requiresUnsandboxed = (metadata) => metadata && typeof metadata.unsandboxed === "string" && metadata.unsandboxed.trim().toLowerCase() === "required";
|
|
580
586
|
var resolveSharedPackageMetadata = (entry, sourceMetadata = {}) => {
|
|
581
587
|
const catalog = entry.metadata || {};
|
package/dist/react.mjs
CHANGED
|
@@ -454,6 +454,9 @@ var messages = {
|
|
|
454
454
|
"source": "Source code",
|
|
455
455
|
"sourceFailed": "Could not retrieve source code.",
|
|
456
456
|
"preview": "Preview for {name}",
|
|
457
|
+
"fetchWaitTitle": "Fetching an extension",
|
|
458
|
+
"fetchWaitRetry": "Could not connect. Trying again ({attempt}/{attempts})",
|
|
459
|
+
"fetchWaitNote": "This takes a few seconds. If it keeps failing, loading stops and the project you had open is restored.",
|
|
457
460
|
"warning": "Extensions without a sandbox can access your project and browser information."
|
|
458
461
|
},
|
|
459
462
|
"ja": {
|
|
@@ -533,6 +536,9 @@ var messages = {
|
|
|
533
536
|
"source": "\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9",
|
|
534
537
|
"sourceFailed": "\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
|
|
535
538
|
"preview": "{name} \u306E\u30D7\u30EC\u30D3\u30E5\u30FC",
|
|
539
|
+
"fetchWaitTitle": "\u6A5F\u80FD\u62E1\u5F35\u3092\u53D6\u5F97\u3057\u3066\u3044\u307E\u3059",
|
|
540
|
+
"fetchWaitRetry": "\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u518D\u8A66\u884C\u3057\u3066\u3044\u307E\u3059\uFF08{attempt}/{attempts}\uFF09",
|
|
541
|
+
"fetchWaitNote": "\u6570\u79D2\u3067\u7D42\u308F\u308A\u307E\u3059\u3002\u305D\u308C\u3067\u3082\u53D6\u5F97\u3067\u304D\u306A\u3044\u5834\u5408\u306F\u8AAD\u307F\u8FBC\u307F\u3092\u4E2D\u6B62\u3057\u3001\u958B\u3044\u3066\u3044\u305F\u4F5C\u54C1\u306B\u623B\u3057\u307E\u3059\u3002",
|
|
536
542
|
"warning": "\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306A\u3057\u306E\u62E1\u5F35\u306F\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3084\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u60C5\u5831\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u3059\u3002"
|
|
537
543
|
}
|
|
538
544
|
};
|
|
@@ -543,7 +549,7 @@ var formatMessage = (locale, key, values = {}) => {
|
|
|
543
549
|
};
|
|
544
550
|
|
|
545
551
|
// src/package-description.jsx
|
|
546
|
-
var commonBanner = "data:image/svg+xml;base64,
|
|
552
|
+
var commonBanner = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIiB2aWV3Qm94PSIwIDAgMzAwIDMwMCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJUdXJib1dhcnAtUGx1cyBleHRlbnNpb24iPjx0aXRsZT5UdXJib1dhcnAtUGx1cyBleHRlbnNpb248L3RpdGxlPjxwYXRoIGZpbGw9IiMwZmJkOGMiIGQ9Ik0zMyA4MkM1NSA3OCA4NCA3OSAxMDYgODJDMTA2IDY3IDkwIDY5IDkwIDU0QzkwIDMyIDE3NCAzMCAxNzQgNTRDMTc0IDY5IDE1OCA2NiAxNTggODJDMTc1IDg2IDE5NiA4NSAyMTMgODJDMjE3IDk5IDIxNiAxMTUgMjEzIDEzMEMyMzAgMTMwIDIyNyAxMTQgMjQ1IDExNEMyNzEgMTE0IDI2OSAyMDYgMjQ1IDIwNkMyMjcgMjA2IDIzMCAxOTAgMjEzIDE5MEMyMDkgMjEwIDIxMCAyNDAgMjEzIDI2MkMyMDMgMjY1IDE4OCAyNjYgMTc0IDI2MkMxNzQgMjQ4IDE4OCAyNTAgMTg4IDIzNkMxODggMjE2IDExMiAyMTQgMTEyIDIzNkMxMTIgMjUwIDEyNiAyNDcgMTI2IDI2MkMxMDggMjU4IDYwIDI1OSAzMyAyNjJDMjkgMjQ1IDMwIDIyNSAzMyAyMDlDNDkgMjA5IDQ2IDIyNSA2MiAyMjVDODYgMjI1IDg0IDEzNyA2MiAxMzdDNDYgMTM3IDQ5IDE1MyAzMyAxNTNDMzcgMTMzIDM2IDEwNSAzMyA4MloiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNOTMuNyAxMDBMMjAxLjcgMTAwTDE5OS45IDEyNkwxODkuOSAxMjZDMTkwLjMgMTIwIDE4OC45IDExMiAxODUuMSAxMDlMMTU5LjEgMTA5TDE1My4xIDE5NEMxNTIuNSAyMDMgMTU3LjMgMjA2IDE2OC4yIDIwN0wxNjggMjEwTDExMiAyMTBMMTEyLjIgMjA3QzEyMy4zIDIwNiAxMjguNSAyMDMgMTI5LjEgMTk0TDEzNS4xIDEwOUwxMDkuMSAxMDlDMTA0LjkgMTEyIDEwMi4zIDEyMCAxMDEuOSAxMjZMOTEuOSAxMjZaIi8+PC9zdmc+Cg==";
|
|
547
553
|
var requiresUnsandboxed = (metadata) => metadata && typeof metadata.unsandboxed === "string" && metadata.unsandboxed.trim().toLowerCase() === "required";
|
|
548
554
|
var resolveSharedPackageMetadata = (entry, sourceMetadata = {}) => {
|
|
549
555
|
const catalog = entry.metadata || {};
|
package/package.json
CHANGED
package/styles.css
CHANGED
package/webpack4.css
CHANGED
|
@@ -207,3 +207,4 @@
|
|
|
207
207
|
:global(.twextsec-resize)[data-edge="ne"], :global(.twextsec-resize)[data-edge="sw"] { cursor: nesw-resize; }
|
|
208
208
|
:global(.twextsec-resize)[data-edge="nw"], :global(.twextsec-resize)[data-edge="se"] { cursor: nwse-resize; }
|
|
209
209
|
[data-twextsec-maximized] > :global(.twextsec-resize) { display: none; }
|
|
210
|
+
|