adnbn 0.2.2 → 0.2.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/{AbstractBuilder-CKgY_Bta.d.ts → AbstractBuilder-BN4TmNJG.d.ts} +3 -3
- package/dist/{AbstractBuilder-Ce5zNRXr.d.mts → AbstractBuilder-C81kWZzQ.d.mts} +3 -3
- package/dist/{BaseTransport-C7uEgfUu.d.mts → BaseTransport-DNZ28gFF.d.mts} +1 -1
- package/dist/{BaseTransport-BdFTZfP0.d.ts → BaseTransport-Ecy2Kzti.d.ts} +1 -1
- package/dist/{Builder-FwJAxWos.d.ts → Builder-BOLvGGqp.d.ts} +2 -2
- package/dist/{Builder-rW3fzusy.d.mts → Builder-BP8SDHO1.d.mts} +2 -2
- package/dist/{Builder-7pbnGvHK.d.ts → Builder-Bc8US0PY.d.ts} +1 -1
- package/dist/{Builder-CCyBD4hF.d.mts → Builder-Df1LUO_f.d.mts} +1 -1
- package/dist/{Message-1cYgMdsu.d.mts → Message-Bnritk3D.d.mts} +1 -1
- package/dist/{Message-DAhczRx9.d.ts → Message-DFDaS7mV.d.ts} +1 -1
- package/dist/{MountBuilder-DjnAmTI0.d.ts → MountBuilder-BTltgVF2.d.mts} +26 -7
- package/dist/{MountBuilder-CjvMOcmn.d.mts → MountBuilder-C9Q-7PeI.d.ts} +26 -7
- package/dist/{ProxyRelay-Ce-szh9p.d.ts → ProxyRelay-DDOSZE3h.d.ts} +3 -3
- package/dist/{ProxyRelay-BOBEhRET.d.mts → ProxyRelay-Uel0ATcx.d.mts} +3 -3
- package/dist/{ProxyTransport-BTVUbDxE.d.mts → ProxyTransport-35rU8xqa.d.mts} +3 -3
- package/dist/{ProxyTransport-BW63K6SU.d.ts → ProxyTransport-D4jv5SFh.d.ts} +3 -3
- package/dist/{RegisterOffscreen-BukckdvS.d.mts → RegisterOffscreen-DT0gN5xN.d.mts} +2 -2
- package/dist/{RegisterOffscreen-DmlpLqjW.d.ts → RegisterOffscreen-df3W5HqA.d.ts} +2 -2
- package/dist/{RegisterRelay-MEVSR1sP.d.mts → RegisterRelay-DCVZ2_NI.d.mts} +2 -2
- package/dist/{RegisterRelay-BaIET78I.d.ts → RegisterRelay-PFT2ac4v.d.ts} +2 -2
- package/dist/{TransportMessage-Bk0wg4rF.d.mts → TransportMessage-CIKrv3DG.d.mts} +8 -4
- package/dist/{TransportMessage-BqMzXWZR.d.ts → TransportMessage-CsObvTPq.d.ts} +8 -4
- package/dist/{background-Zjiqg60g.d.ts → background-CpVjDFHQ.d.ts} +1 -1
- package/dist/{background-CyGGjmBx.d.mts → background-cxLBji1Q.d.mts} +1 -1
- package/dist/cli/index.cjs +45 -14
- package/dist/cli/index.cjs.map +1 -1
- package/dist/{command-BFsdm7Bx.d.mts → command-S2dcqx6Q.d.mts} +4 -3
- package/dist/{command-3i_5d__K.d.ts → command-TJ2JUrVd.d.ts} +4 -3
- package/dist/{content-sdYF4W-A.d.ts → content-B0znLIjr.d.ts} +37 -4
- package/dist/{content-BYoXVO6V.d.mts → content-DrrPH4ri.d.mts} +37 -4
- package/dist/entry/background/index.d.mts +2 -2
- package/dist/entry/background/index.d.ts +2 -2
- package/dist/entry/command/index.d.mts +3 -3
- package/dist/entry/command/index.d.ts +3 -3
- package/dist/entry/content/index.d.mts +2 -2
- package/dist/entry/content/index.d.ts +2 -2
- package/dist/entry/content/react/index.cjs +104 -18
- package/dist/entry/content/react/index.cjs.map +1 -1
- package/dist/entry/content/react/index.d.mts +4 -4
- package/dist/entry/content/react/index.d.ts +4 -4
- package/dist/entry/content/react/index.js +104 -18
- package/dist/entry/content/react/index.js.map +1 -1
- package/dist/entry/content/vanilla/index.cjs +108 -18
- package/dist/entry/content/vanilla/index.cjs.map +1 -1
- package/dist/entry/content/vanilla/index.d.mts +4 -4
- package/dist/entry/content/vanilla/index.d.ts +4 -4
- package/dist/entry/content/vanilla/index.js +108 -18
- package/dist/entry/content/vanilla/index.js.map +1 -1
- package/dist/entry/offscreen/index.cjs +27 -4
- package/dist/entry/offscreen/index.cjs.map +1 -1
- package/dist/entry/offscreen/index.d.mts +11 -9
- package/dist/entry/offscreen/index.d.ts +11 -9
- package/dist/entry/offscreen/index.js +27 -4
- package/dist/entry/offscreen/index.js.map +1 -1
- package/dist/entry/relay/index.d.mts +9 -8
- package/dist/entry/relay/index.d.ts +9 -8
- package/dist/entry/service/index.cjs +31 -10
- package/dist/entry/service/index.cjs.map +1 -1
- package/dist/entry/service/index.d.mts +5 -4
- package/dist/entry/service/index.d.ts +5 -4
- package/dist/entry/service/index.js +31 -10
- package/dist/entry/service/index.js.map +1 -1
- package/dist/entry/transport/index.d.mts +8 -7
- package/dist/entry/transport/index.d.ts +8 -7
- package/dist/entry/view/index.d.mts +2 -2
- package/dist/entry/view/index.d.ts +2 -2
- package/dist/entry/view/react/index.d.mts +4 -4
- package/dist/entry/view/react/index.d.ts +4 -4
- package/dist/entry/view/vanilla/index.d.mts +4 -4
- package/dist/entry/view/vanilla/index.d.ts +4 -4
- package/dist/{helpers-DnV3N7fU.d.mts → helpers-YDFORuZz.d.mts} +2 -2
- package/dist/{helpers-DnV3N7fU.d.ts → helpers-YDFORuZz.d.ts} +2 -2
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +63 -22
- package/dist/index.d.ts +63 -22
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/message/index.cjs.map +1 -1
- package/dist/message/index.d.mts +4 -3
- package/dist/message/index.d.ts +4 -3
- package/dist/message/index.js.map +1 -1
- package/dist/message/react/index.cjs.map +1 -1
- package/dist/message/react/index.d.mts +1 -1
- package/dist/message/react/index.d.ts +1 -1
- package/dist/message/react/index.js.map +1 -1
- package/dist/{message-55r-wFjc.d.mts → message-jsmkeGHC.d.mts} +5 -1
- package/dist/{message-55r-wFjc.d.ts → message-jsmkeGHC.d.ts} +5 -1
- package/dist/offscreen/index.cjs +30 -5
- package/dist/offscreen/index.cjs.map +1 -1
- package/dist/offscreen/index.d.mts +10 -9
- package/dist/offscreen/index.d.ts +10 -9
- package/dist/offscreen/index.js +30 -5
- package/dist/offscreen/index.js.map +1 -1
- package/dist/{offscreen-B9GiglgN.d.mts → offscreen-2EP-rRfx.d.mts} +3 -3
- package/dist/{offscreen-BG5Abe8V.d.ts → offscreen-aHdkogKj.d.ts} +3 -3
- package/dist/relay/index.d.mts +8 -7
- package/dist/relay/index.d.ts +8 -7
- package/dist/{relay-DymeeDe7.d.ts → relay-DT46Ltms.d.ts} +3 -3
- package/dist/{relay-BYeTCwKO.d.mts → relay-vaJ5R2iC.d.mts} +3 -3
- package/dist/service/index.cjs +27 -4
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +8 -6
- package/dist/service/index.d.ts +8 -6
- package/dist/service/index.js +27 -4
- package/dist/service/index.js.map +1 -1
- package/dist/{service-BhJhIk-O.d.ts → service-6FdoYGNC.d.ts} +3 -3
- package/dist/{service-DsivypLQ.d.mts → service-C9HbDQPE.d.mts} +3 -3
- package/dist/{transport-B_uYwoGi.d.mts → transport-BrbirhXv.d.mts} +3 -2
- package/dist/{transport-BPmSUoEU.d.ts → transport-Co9Oxp0-.d.ts} +3 -2
- package/dist/{view-QDP2Maev.d.mts → view-Bs26Jcvi.d.mts} +1 -1
- package/dist/{view-D4dquvKl.d.ts → view-u9w7nMgw.d.ts} +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { a as BackgroundDefinition, B as BackgroundConfig } from './background-
|
|
2
|
-
export { b as BackgroundMainHandler } from './background-
|
|
3
|
-
import { A as Awaiter, d as EntrypointFile, B as Browser, D as DeepAsyncProxy } from './helpers-
|
|
4
|
-
import { C as CommandDefinition, E as ExecuteActionCommandDefinition, b as CommandConfig } from './command-
|
|
5
|
-
export { a as CommandExecute,
|
|
1
|
+
import { a as BackgroundDefinition, B as BackgroundConfig } from './background-cxLBji1Q.mjs';
|
|
2
|
+
export { b as BackgroundMainHandler } from './background-cxLBji1Q.mjs';
|
|
3
|
+
import { A as Awaiter, d as EntrypointFile, B as Browser, D as DeepAsyncProxy } from './helpers-YDFORuZz.mjs';
|
|
4
|
+
import { C as CommandDefinition, E as ExecuteActionCommandDefinition, b as CommandConfig } from './command-S2dcqx6Q.mjs';
|
|
5
|
+
export { a as CommandExecute, d as CommandExecuteActionName, c as CommandUnresolvedDefinition } from './command-S2dcqx6Q.mjs';
|
|
6
6
|
import { Configuration, Filename } from '@rspack/core';
|
|
7
7
|
import { Options } from 'html-rspack-tags-plugin';
|
|
8
|
-
import { C as ContentScriptConfig, a as ContentScriptDefinition,
|
|
9
|
-
export {
|
|
8
|
+
import { C as ContentScriptConfig, a as ContentScriptDefinition, v as ContentScriptAppendDefinition } from './content-DrrPH4ri.mjs';
|
|
9
|
+
export { l as ContentScriptAnchor, m as ContentScriptAnchorGetter, n as ContentScriptAnchorResolver, z as ContentScriptAppend, f as ContentScriptBuilder, s as ContentScriptContainerCreator, r as ContentScriptContainerFactory, q as ContentScriptContainerOptions, p as ContentScriptContainerTag, b as ContentScriptContext, y as ContentScriptEntrypointOptions, j as ContentScriptEvent, i as ContentScriptEventCallback, g as ContentScriptEventEmitter, D as ContentScriptMainFunction, w as ContentScriptMatches, A as ContentScriptMount, o as ContentScriptMountFunction, c as ContentScriptNode, h as ContentScriptNodeSet, x as ContentScriptOptions, u as ContentScriptProps, e as ContentScriptRenderHandler, B as ContentScriptRenderReactComponent, d as ContentScriptRenderValue, k as ContentScriptResolvedDefinition, t as ContentScriptWatchStrategy } from './content-DrrPH4ri.mjs';
|
|
10
10
|
import { a as Language } from './locale-Do4kUmgC.mjs';
|
|
11
|
-
import { O as OffscreenDefinition } from './offscreen-
|
|
12
|
-
export { d as OffscreenReason, c as OffscreenUnresolvedDefinition } from './offscreen-
|
|
13
|
-
import { e as TransportType, a as TransportDictionary } from './transport-
|
|
14
|
-
import { V as ViewOptions, b as ViewDefinition } from './view-
|
|
15
|
-
import { P as ProxyRelayOptions } from './ProxyRelay-
|
|
16
|
-
import { R as RelayDefinition } from './relay-
|
|
17
|
-
export { c as RelayUnresolvedDefinition } from './relay-
|
|
18
|
-
import { S as ServiceDefinition } from './service-
|
|
11
|
+
import { O as OffscreenDefinition } from './offscreen-2EP-rRfx.mjs';
|
|
12
|
+
export { d as OffscreenReason, c as OffscreenUnresolvedDefinition } from './offscreen-2EP-rRfx.mjs';
|
|
13
|
+
import { e as TransportType, a as TransportDictionary } from './transport-BrbirhXv.mjs';
|
|
14
|
+
import { V as ViewOptions, b as ViewDefinition } from './view-Bs26Jcvi.mjs';
|
|
15
|
+
import { P as ProxyRelayOptions } from './ProxyRelay-Uel0ATcx.mjs';
|
|
16
|
+
import { R as RelayDefinition } from './relay-vaJ5R2iC.mjs';
|
|
17
|
+
export { c as RelayUnresolvedDefinition } from './relay-vaJ5R2iC.mjs';
|
|
18
|
+
import { S as ServiceDefinition } from './service-C9HbDQPE.mjs';
|
|
19
19
|
export { contentScriptMountAppendResolver, isContentScriptDefinition, isValidContentScriptDefinitionRenderValue } from './entry/content/index.mjs';
|
|
20
20
|
import 'react';
|
|
21
21
|
import 'utility-types';
|
|
22
|
+
import './message-jsmkeGHC.mjs';
|
|
22
23
|
import '@adnbn/inject-script';
|
|
23
|
-
import './ProxyTransport-
|
|
24
|
-
import './BaseTransport-
|
|
24
|
+
import './ProxyTransport-35rU8xqa.mjs';
|
|
25
|
+
import './BaseTransport-DNZ28gFF.mjs';
|
|
25
26
|
|
|
26
27
|
declare enum Mode {
|
|
27
28
|
None = "none",
|
|
@@ -360,13 +361,17 @@ interface Config {
|
|
|
360
361
|
* Final extension files will be located here.
|
|
361
362
|
* @example "./dist"
|
|
362
363
|
* @path Output path: `{{inputDir}}/{{outputDir}}`
|
|
364
|
+
*
|
|
365
|
+
* @default "dist"
|
|
363
366
|
*/
|
|
364
367
|
outputDir: string;
|
|
365
368
|
/**
|
|
366
|
-
* Directory where the application and
|
|
369
|
+
* Directory where the application and shared directory are located.
|
|
367
370
|
* Main directory with source code.
|
|
368
371
|
* @example "src"
|
|
369
372
|
* @path Full path: `{{inputDir}}/{{srcDir}}`
|
|
373
|
+
*
|
|
374
|
+
* @default "src"
|
|
370
375
|
*/
|
|
371
376
|
srcDir: string;
|
|
372
377
|
/**
|
|
@@ -374,6 +379,8 @@ interface Config {
|
|
|
374
379
|
* Contains code used by multiple extensions.
|
|
375
380
|
* @example "shared"
|
|
376
381
|
* @path Full path: `{{inputDir}}/{{srcDir}}//{{sharedDir}}`
|
|
382
|
+
*
|
|
383
|
+
* @default "shared"
|
|
377
384
|
*/
|
|
378
385
|
sharedDir: string;
|
|
379
386
|
/**
|
|
@@ -381,6 +388,8 @@ interface Config {
|
|
|
381
388
|
* These extensions can use code from the Shared directory.
|
|
382
389
|
* @example "apps"
|
|
383
390
|
* @path Full path: `{{inputDir}}/{{srcDir}}/{{appsDir}}`
|
|
391
|
+
*
|
|
392
|
+
* @default "apps"
|
|
384
393
|
*/
|
|
385
394
|
appsDir: string;
|
|
386
395
|
/**
|
|
@@ -388,6 +397,8 @@ interface Config {
|
|
|
388
397
|
* May contain additional structure, such as a src folder.
|
|
389
398
|
* @example "src"
|
|
390
399
|
* @path Full path: `{{inputDir}}/{{appsDir}}/{{appDir}}/{{appSrcDir}}`
|
|
400
|
+
*
|
|
401
|
+
* @default "."
|
|
391
402
|
*/
|
|
392
403
|
appSrcDir: string;
|
|
393
404
|
/**
|
|
@@ -395,6 +406,8 @@ interface Config {
|
|
|
395
406
|
* All compiled JS files will be placed here.
|
|
396
407
|
* @example "js"
|
|
397
408
|
* @path Full path: `{{inputDir}}//{{outputDir}}/{{appDir}}/{{jsDir}}`
|
|
409
|
+
*
|
|
410
|
+
* @default "js"
|
|
398
411
|
*/
|
|
399
412
|
jsDir: string;
|
|
400
413
|
/**
|
|
@@ -402,18 +415,24 @@ interface Config {
|
|
|
402
415
|
* All compiled styles will be placed here.
|
|
403
416
|
* @example "css"
|
|
404
417
|
* @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{cssDir}}`
|
|
418
|
+
*
|
|
419
|
+
* @default "css"
|
|
405
420
|
*/
|
|
406
421
|
cssDir: string;
|
|
407
422
|
/**
|
|
408
423
|
* Directory for assets (images, fonts, etc.) in outputDir.
|
|
409
424
|
* @example "assets"
|
|
410
425
|
* @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{assetsDir}}`
|
|
426
|
+
*
|
|
427
|
+
* @default "assets"
|
|
411
428
|
*/
|
|
412
429
|
assetsDir: string;
|
|
413
430
|
/**
|
|
414
431
|
* Directory for HTML files in outputDir.
|
|
415
432
|
* @example "view"
|
|
416
433
|
* @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{htmlDir}}`
|
|
434
|
+
*
|
|
435
|
+
* @default "."
|
|
417
436
|
*/
|
|
418
437
|
htmlDir: string;
|
|
419
438
|
/**
|
|
@@ -499,17 +518,17 @@ interface Config {
|
|
|
499
518
|
lang?: string | Language;
|
|
500
519
|
/**
|
|
501
520
|
* Default locale key from translation files or a string.
|
|
502
|
-
* @example "
|
|
521
|
+
* @example "@app.name" or "Awesome App"
|
|
503
522
|
*/
|
|
504
523
|
name?: string;
|
|
505
524
|
/**
|
|
506
525
|
* Default locale key for a short name from translation files or a string.
|
|
507
|
-
* @example "
|
|
526
|
+
* @example "@app.short_name" or "Awesome"
|
|
508
527
|
*/
|
|
509
528
|
shortName?: string;
|
|
510
529
|
/**
|
|
511
530
|
* Default locale key for description from translation files or a string.
|
|
512
|
-
* @example "
|
|
531
|
+
* @example "@app.description" or "My awesome app description"
|
|
513
532
|
*/
|
|
514
533
|
description?: string;
|
|
515
534
|
};
|
|
@@ -522,6 +541,8 @@ interface Config {
|
|
|
522
541
|
* Flag to enable dependency analyzer.
|
|
523
542
|
* When activated, open RSDoctor during the build, which shows
|
|
524
543
|
* project dependencies and their sizes.
|
|
544
|
+
*
|
|
545
|
+
* @default false
|
|
525
546
|
*/
|
|
526
547
|
analyze: boolean;
|
|
527
548
|
/**
|
|
@@ -532,41 +553,57 @@ interface Config {
|
|
|
532
553
|
/**
|
|
533
554
|
* Flag indicating whether to merge background scripts from App and Shared directories.
|
|
534
555
|
* When `true`, background scripts from both directories will be combined into a single file.
|
|
556
|
+
*
|
|
557
|
+
* @default false
|
|
535
558
|
*/
|
|
536
559
|
mergeBackground: boolean;
|
|
537
560
|
/**
|
|
538
561
|
* Flag indicating whether to merge commands from App and Shared directories.
|
|
539
562
|
* When `true`, commands from both directories will be combined.
|
|
563
|
+
*
|
|
564
|
+
* @default false
|
|
540
565
|
*/
|
|
541
566
|
mergeCommands: boolean;
|
|
542
567
|
/**
|
|
543
568
|
* Flag indicating whether to merge content scripts from App and Shared directories.
|
|
544
569
|
* When `true`, content scripts from both directories will be combined.
|
|
570
|
+
*
|
|
571
|
+
* @default false
|
|
545
572
|
*/
|
|
546
573
|
mergeContentScripts: boolean;
|
|
547
574
|
/**
|
|
548
575
|
* Flag indicating whether to combine content scripts with identical options into one chunk.
|
|
549
576
|
* When `true`, content scripts with identical settings will be compiled into a single file.
|
|
577
|
+
*
|
|
578
|
+
* @default true
|
|
550
579
|
*/
|
|
551
580
|
concatContentScripts: boolean;
|
|
552
581
|
/**
|
|
553
582
|
* Flag indicating whether to merge styles from App and Shared directories.
|
|
554
583
|
* When `true`, styles from both directories will be combined.
|
|
584
|
+
*
|
|
585
|
+
* @default true
|
|
555
586
|
*/
|
|
556
587
|
mergeStyles: boolean;
|
|
557
588
|
/**
|
|
558
589
|
* Flag indicating whether to merge icon files from App and Shared directories.
|
|
559
590
|
* When `true`, icon files from both directories will be combined.
|
|
591
|
+
*
|
|
592
|
+
* @default false
|
|
560
593
|
*/
|
|
561
594
|
mergeIcons: boolean;
|
|
562
595
|
/**
|
|
563
596
|
* Flag indicating whether to merge localizations from App and Shared directories.
|
|
564
597
|
* When `true`, localization files from both directories will be combined.
|
|
598
|
+
*
|
|
599
|
+
* @default true
|
|
565
600
|
*/
|
|
566
601
|
mergeLocales: boolean;
|
|
567
602
|
/**
|
|
568
603
|
* Flag indicating whether to merge page files from App and Shared directories.
|
|
569
604
|
* When `true`, page files from both directories will be combined.
|
|
605
|
+
*
|
|
606
|
+
* @default false
|
|
570
607
|
*/
|
|
571
608
|
mergePages: boolean;
|
|
572
609
|
/**
|
|
@@ -611,11 +648,15 @@ interface Config {
|
|
|
611
648
|
/**
|
|
612
649
|
* Flag indicating whether to merge service files from App and Shared directories.
|
|
613
650
|
* When `true`, service files from both directories will be combined.
|
|
651
|
+
*
|
|
652
|
+
* @default false
|
|
614
653
|
*/
|
|
615
654
|
mergeService: boolean;
|
|
616
655
|
/**
|
|
617
656
|
* Flag indicating whether to merge offscreen files from App and Shared directories.
|
|
618
657
|
* When `true`, offscreen files from both directories will be combined.
|
|
658
|
+
*
|
|
659
|
+
* @default false
|
|
619
660
|
*/
|
|
620
661
|
mergeOffscreen: boolean;
|
|
621
662
|
/**
|
|
@@ -840,4 +881,4 @@ declare const defineSidebar: (options: SidebarDefinition) => SidebarDefinition;
|
|
|
840
881
|
declare const getSidebars: () => SidebarMap;
|
|
841
882
|
declare const changeSidebar: (alias: SidebarAlias, tab?: number | Tab) => Promise<void>;
|
|
842
883
|
|
|
843
|
-
export { BackgroundConfig, BackgroundDefinition, Browser, Command, CommandConfig, CommandDefinition, type Config, type ConfigDefinition, ContentScriptAppendDefinition, ContentScriptConfig, ContentScriptDefinition, ExecuteActionCommandDefinition, type ManifestBuilder, ManifestIncognito, Mode, type OffscreenAlias, OffscreenDefinition, type OffscreenMap, type PageAlias, type PageConfig, type PageDefinition, type PageMap, type PageProps, type Plugin, type PluginDefinition, type PopupAlias, type PopupMap, type ReadonlyConfig, RelayDefinition, ServiceDefinition, type SidebarAlias, type SidebarMap, type UserConfig, changeActionIcon, changePopup, changeSidebar, defineBackground, defineCommand, defineConfig, defineContentScript, defineContentScriptAppend, defineExecuteActionCommand, defineOffscreen, definePage, definePlugin, definePopup, defineRelay, defineService, defineSidebar, getApp, getBrowser, getEnv, getIcons, getManifestVersion, getOffscreen, getOffscreens, getPageUrl, getPages, getPopups, getRelay, getService, getSidebars, isBrowser };
|
|
884
|
+
export { BackgroundConfig, BackgroundDefinition, Browser, Command, CommandConfig, CommandDefinition, type Config, type ConfigDefinition, ContentScriptAppendDefinition, ContentScriptConfig, ContentScriptDefinition, ExecuteActionCommandDefinition, type ManifestBuilder, ManifestIncognito, Mode, type OffscreenAlias, OffscreenDefinition, type OffscreenMap, type PageAlias, type PageConfig, type PageDefinition, type PageMap, type PageProps, type Plugin, type PluginDefinition, type PopupAlias, type PopupMap, type ReadonlyConfig, RelayDefinition, ServiceDefinition, type SidebarAlias, type SidebarMap, type UserConfig, ViewDefinition, ViewOptions, changeActionIcon, changePopup, changeSidebar, defineBackground, defineCommand, defineConfig, defineContentScript, defineContentScriptAppend, defineExecuteActionCommand, defineOffscreen, definePage, definePlugin, definePopup, defineRelay, defineService, defineSidebar, getApp, getBrowser, getEnv, getIcons, getManifestVersion, getOffscreen, getOffscreens, getPageUrl, getPages, getPopups, getRelay, getService, getSidebars, isBrowser };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { a as BackgroundDefinition, B as BackgroundConfig } from './background-
|
|
2
|
-
export { b as BackgroundMainHandler } from './background-
|
|
3
|
-
import { A as Awaiter, d as EntrypointFile, B as Browser, D as DeepAsyncProxy } from './helpers-
|
|
4
|
-
import { C as CommandDefinition, E as ExecuteActionCommandDefinition, b as CommandConfig } from './command-
|
|
5
|
-
export { a as CommandExecute,
|
|
1
|
+
import { a as BackgroundDefinition, B as BackgroundConfig } from './background-CpVjDFHQ.js';
|
|
2
|
+
export { b as BackgroundMainHandler } from './background-CpVjDFHQ.js';
|
|
3
|
+
import { A as Awaiter, d as EntrypointFile, B as Browser, D as DeepAsyncProxy } from './helpers-YDFORuZz.js';
|
|
4
|
+
import { C as CommandDefinition, E as ExecuteActionCommandDefinition, b as CommandConfig } from './command-TJ2JUrVd.js';
|
|
5
|
+
export { a as CommandExecute, d as CommandExecuteActionName, c as CommandUnresolvedDefinition } from './command-TJ2JUrVd.js';
|
|
6
6
|
import { Configuration, Filename } from '@rspack/core';
|
|
7
7
|
import { Options } from 'html-rspack-tags-plugin';
|
|
8
|
-
import { C as ContentScriptConfig, a as ContentScriptDefinition,
|
|
9
|
-
export {
|
|
8
|
+
import { C as ContentScriptConfig, a as ContentScriptDefinition, v as ContentScriptAppendDefinition } from './content-B0znLIjr.js';
|
|
9
|
+
export { l as ContentScriptAnchor, m as ContentScriptAnchorGetter, n as ContentScriptAnchorResolver, z as ContentScriptAppend, f as ContentScriptBuilder, s as ContentScriptContainerCreator, r as ContentScriptContainerFactory, q as ContentScriptContainerOptions, p as ContentScriptContainerTag, b as ContentScriptContext, y as ContentScriptEntrypointOptions, j as ContentScriptEvent, i as ContentScriptEventCallback, g as ContentScriptEventEmitter, D as ContentScriptMainFunction, w as ContentScriptMatches, A as ContentScriptMount, o as ContentScriptMountFunction, c as ContentScriptNode, h as ContentScriptNodeSet, x as ContentScriptOptions, u as ContentScriptProps, e as ContentScriptRenderHandler, B as ContentScriptRenderReactComponent, d as ContentScriptRenderValue, k as ContentScriptResolvedDefinition, t as ContentScriptWatchStrategy } from './content-B0znLIjr.js';
|
|
10
10
|
import { a as Language } from './locale-Do4kUmgC.js';
|
|
11
|
-
import { O as OffscreenDefinition } from './offscreen-
|
|
12
|
-
export { d as OffscreenReason, c as OffscreenUnresolvedDefinition } from './offscreen-
|
|
13
|
-
import { e as TransportType, a as TransportDictionary } from './transport-
|
|
14
|
-
import { V as ViewOptions, b as ViewDefinition } from './view-
|
|
15
|
-
import { P as ProxyRelayOptions } from './ProxyRelay-
|
|
16
|
-
import { R as RelayDefinition } from './relay-
|
|
17
|
-
export { c as RelayUnresolvedDefinition } from './relay-
|
|
18
|
-
import { S as ServiceDefinition } from './service-
|
|
11
|
+
import { O as OffscreenDefinition } from './offscreen-aHdkogKj.js';
|
|
12
|
+
export { d as OffscreenReason, c as OffscreenUnresolvedDefinition } from './offscreen-aHdkogKj.js';
|
|
13
|
+
import { e as TransportType, a as TransportDictionary } from './transport-Co9Oxp0-.js';
|
|
14
|
+
import { V as ViewOptions, b as ViewDefinition } from './view-u9w7nMgw.js';
|
|
15
|
+
import { P as ProxyRelayOptions } from './ProxyRelay-DDOSZE3h.js';
|
|
16
|
+
import { R as RelayDefinition } from './relay-DT46Ltms.js';
|
|
17
|
+
export { c as RelayUnresolvedDefinition } from './relay-DT46Ltms.js';
|
|
18
|
+
import { S as ServiceDefinition } from './service-6FdoYGNC.js';
|
|
19
19
|
export { contentScriptMountAppendResolver, isContentScriptDefinition, isValidContentScriptDefinitionRenderValue } from './entry/content/index.js';
|
|
20
20
|
import 'react';
|
|
21
21
|
import 'utility-types';
|
|
22
|
+
import './message-jsmkeGHC.js';
|
|
22
23
|
import '@adnbn/inject-script';
|
|
23
|
-
import './ProxyTransport-
|
|
24
|
-
import './BaseTransport-
|
|
24
|
+
import './ProxyTransport-D4jv5SFh.js';
|
|
25
|
+
import './BaseTransport-Ecy2Kzti.js';
|
|
25
26
|
|
|
26
27
|
declare enum Mode {
|
|
27
28
|
None = "none",
|
|
@@ -360,13 +361,17 @@ interface Config {
|
|
|
360
361
|
* Final extension files will be located here.
|
|
361
362
|
* @example "./dist"
|
|
362
363
|
* @path Output path: `{{inputDir}}/{{outputDir}}`
|
|
364
|
+
*
|
|
365
|
+
* @default "dist"
|
|
363
366
|
*/
|
|
364
367
|
outputDir: string;
|
|
365
368
|
/**
|
|
366
|
-
* Directory where the application and
|
|
369
|
+
* Directory where the application and shared directory are located.
|
|
367
370
|
* Main directory with source code.
|
|
368
371
|
* @example "src"
|
|
369
372
|
* @path Full path: `{{inputDir}}/{{srcDir}}`
|
|
373
|
+
*
|
|
374
|
+
* @default "src"
|
|
370
375
|
*/
|
|
371
376
|
srcDir: string;
|
|
372
377
|
/**
|
|
@@ -374,6 +379,8 @@ interface Config {
|
|
|
374
379
|
* Contains code used by multiple extensions.
|
|
375
380
|
* @example "shared"
|
|
376
381
|
* @path Full path: `{{inputDir}}/{{srcDir}}//{{sharedDir}}`
|
|
382
|
+
*
|
|
383
|
+
* @default "shared"
|
|
377
384
|
*/
|
|
378
385
|
sharedDir: string;
|
|
379
386
|
/**
|
|
@@ -381,6 +388,8 @@ interface Config {
|
|
|
381
388
|
* These extensions can use code from the Shared directory.
|
|
382
389
|
* @example "apps"
|
|
383
390
|
* @path Full path: `{{inputDir}}/{{srcDir}}/{{appsDir}}`
|
|
391
|
+
*
|
|
392
|
+
* @default "apps"
|
|
384
393
|
*/
|
|
385
394
|
appsDir: string;
|
|
386
395
|
/**
|
|
@@ -388,6 +397,8 @@ interface Config {
|
|
|
388
397
|
* May contain additional structure, such as a src folder.
|
|
389
398
|
* @example "src"
|
|
390
399
|
* @path Full path: `{{inputDir}}/{{appsDir}}/{{appDir}}/{{appSrcDir}}`
|
|
400
|
+
*
|
|
401
|
+
* @default "."
|
|
391
402
|
*/
|
|
392
403
|
appSrcDir: string;
|
|
393
404
|
/**
|
|
@@ -395,6 +406,8 @@ interface Config {
|
|
|
395
406
|
* All compiled JS files will be placed here.
|
|
396
407
|
* @example "js"
|
|
397
408
|
* @path Full path: `{{inputDir}}//{{outputDir}}/{{appDir}}/{{jsDir}}`
|
|
409
|
+
*
|
|
410
|
+
* @default "js"
|
|
398
411
|
*/
|
|
399
412
|
jsDir: string;
|
|
400
413
|
/**
|
|
@@ -402,18 +415,24 @@ interface Config {
|
|
|
402
415
|
* All compiled styles will be placed here.
|
|
403
416
|
* @example "css"
|
|
404
417
|
* @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{cssDir}}`
|
|
418
|
+
*
|
|
419
|
+
* @default "css"
|
|
405
420
|
*/
|
|
406
421
|
cssDir: string;
|
|
407
422
|
/**
|
|
408
423
|
* Directory for assets (images, fonts, etc.) in outputDir.
|
|
409
424
|
* @example "assets"
|
|
410
425
|
* @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{assetsDir}}`
|
|
426
|
+
*
|
|
427
|
+
* @default "assets"
|
|
411
428
|
*/
|
|
412
429
|
assetsDir: string;
|
|
413
430
|
/**
|
|
414
431
|
* Directory for HTML files in outputDir.
|
|
415
432
|
* @example "view"
|
|
416
433
|
* @path Full path: `{{inputDir}}/{{outputDir}}/{{appDir}}/{{htmlDir}}`
|
|
434
|
+
*
|
|
435
|
+
* @default "."
|
|
417
436
|
*/
|
|
418
437
|
htmlDir: string;
|
|
419
438
|
/**
|
|
@@ -499,17 +518,17 @@ interface Config {
|
|
|
499
518
|
lang?: string | Language;
|
|
500
519
|
/**
|
|
501
520
|
* Default locale key from translation files or a string.
|
|
502
|
-
* @example "
|
|
521
|
+
* @example "@app.name" or "Awesome App"
|
|
503
522
|
*/
|
|
504
523
|
name?: string;
|
|
505
524
|
/**
|
|
506
525
|
* Default locale key for a short name from translation files or a string.
|
|
507
|
-
* @example "
|
|
526
|
+
* @example "@app.short_name" or "Awesome"
|
|
508
527
|
*/
|
|
509
528
|
shortName?: string;
|
|
510
529
|
/**
|
|
511
530
|
* Default locale key for description from translation files or a string.
|
|
512
|
-
* @example "
|
|
531
|
+
* @example "@app.description" or "My awesome app description"
|
|
513
532
|
*/
|
|
514
533
|
description?: string;
|
|
515
534
|
};
|
|
@@ -522,6 +541,8 @@ interface Config {
|
|
|
522
541
|
* Flag to enable dependency analyzer.
|
|
523
542
|
* When activated, open RSDoctor during the build, which shows
|
|
524
543
|
* project dependencies and their sizes.
|
|
544
|
+
*
|
|
545
|
+
* @default false
|
|
525
546
|
*/
|
|
526
547
|
analyze: boolean;
|
|
527
548
|
/**
|
|
@@ -532,41 +553,57 @@ interface Config {
|
|
|
532
553
|
/**
|
|
533
554
|
* Flag indicating whether to merge background scripts from App and Shared directories.
|
|
534
555
|
* When `true`, background scripts from both directories will be combined into a single file.
|
|
556
|
+
*
|
|
557
|
+
* @default false
|
|
535
558
|
*/
|
|
536
559
|
mergeBackground: boolean;
|
|
537
560
|
/**
|
|
538
561
|
* Flag indicating whether to merge commands from App and Shared directories.
|
|
539
562
|
* When `true`, commands from both directories will be combined.
|
|
563
|
+
*
|
|
564
|
+
* @default false
|
|
540
565
|
*/
|
|
541
566
|
mergeCommands: boolean;
|
|
542
567
|
/**
|
|
543
568
|
* Flag indicating whether to merge content scripts from App and Shared directories.
|
|
544
569
|
* When `true`, content scripts from both directories will be combined.
|
|
570
|
+
*
|
|
571
|
+
* @default false
|
|
545
572
|
*/
|
|
546
573
|
mergeContentScripts: boolean;
|
|
547
574
|
/**
|
|
548
575
|
* Flag indicating whether to combine content scripts with identical options into one chunk.
|
|
549
576
|
* When `true`, content scripts with identical settings will be compiled into a single file.
|
|
577
|
+
*
|
|
578
|
+
* @default true
|
|
550
579
|
*/
|
|
551
580
|
concatContentScripts: boolean;
|
|
552
581
|
/**
|
|
553
582
|
* Flag indicating whether to merge styles from App and Shared directories.
|
|
554
583
|
* When `true`, styles from both directories will be combined.
|
|
584
|
+
*
|
|
585
|
+
* @default true
|
|
555
586
|
*/
|
|
556
587
|
mergeStyles: boolean;
|
|
557
588
|
/**
|
|
558
589
|
* Flag indicating whether to merge icon files from App and Shared directories.
|
|
559
590
|
* When `true`, icon files from both directories will be combined.
|
|
591
|
+
*
|
|
592
|
+
* @default false
|
|
560
593
|
*/
|
|
561
594
|
mergeIcons: boolean;
|
|
562
595
|
/**
|
|
563
596
|
* Flag indicating whether to merge localizations from App and Shared directories.
|
|
564
597
|
* When `true`, localization files from both directories will be combined.
|
|
598
|
+
*
|
|
599
|
+
* @default true
|
|
565
600
|
*/
|
|
566
601
|
mergeLocales: boolean;
|
|
567
602
|
/**
|
|
568
603
|
* Flag indicating whether to merge page files from App and Shared directories.
|
|
569
604
|
* When `true`, page files from both directories will be combined.
|
|
605
|
+
*
|
|
606
|
+
* @default false
|
|
570
607
|
*/
|
|
571
608
|
mergePages: boolean;
|
|
572
609
|
/**
|
|
@@ -611,11 +648,15 @@ interface Config {
|
|
|
611
648
|
/**
|
|
612
649
|
* Flag indicating whether to merge service files from App and Shared directories.
|
|
613
650
|
* When `true`, service files from both directories will be combined.
|
|
651
|
+
*
|
|
652
|
+
* @default false
|
|
614
653
|
*/
|
|
615
654
|
mergeService: boolean;
|
|
616
655
|
/**
|
|
617
656
|
* Flag indicating whether to merge offscreen files from App and Shared directories.
|
|
618
657
|
* When `true`, offscreen files from both directories will be combined.
|
|
658
|
+
*
|
|
659
|
+
* @default false
|
|
619
660
|
*/
|
|
620
661
|
mergeOffscreen: boolean;
|
|
621
662
|
/**
|
|
@@ -840,4 +881,4 @@ declare const defineSidebar: (options: SidebarDefinition) => SidebarDefinition;
|
|
|
840
881
|
declare const getSidebars: () => SidebarMap;
|
|
841
882
|
declare const changeSidebar: (alias: SidebarAlias, tab?: number | Tab) => Promise<void>;
|
|
842
883
|
|
|
843
|
-
export { BackgroundConfig, BackgroundDefinition, Browser, Command, CommandConfig, CommandDefinition, type Config, type ConfigDefinition, ContentScriptAppendDefinition, ContentScriptConfig, ContentScriptDefinition, ExecuteActionCommandDefinition, type ManifestBuilder, ManifestIncognito, Mode, type OffscreenAlias, OffscreenDefinition, type OffscreenMap, type PageAlias, type PageConfig, type PageDefinition, type PageMap, type PageProps, type Plugin, type PluginDefinition, type PopupAlias, type PopupMap, type ReadonlyConfig, RelayDefinition, ServiceDefinition, type SidebarAlias, type SidebarMap, type UserConfig, changeActionIcon, changePopup, changeSidebar, defineBackground, defineCommand, defineConfig, defineContentScript, defineContentScriptAppend, defineExecuteActionCommand, defineOffscreen, definePage, definePlugin, definePopup, defineRelay, defineService, defineSidebar, getApp, getBrowser, getEnv, getIcons, getManifestVersion, getOffscreen, getOffscreens, getPageUrl, getPages, getPopups, getRelay, getService, getSidebars, isBrowser };
|
|
884
|
+
export { BackgroundConfig, BackgroundDefinition, Browser, Command, CommandConfig, CommandDefinition, type Config, type ConfigDefinition, ContentScriptAppendDefinition, ContentScriptConfig, ContentScriptDefinition, ExecuteActionCommandDefinition, type ManifestBuilder, ManifestIncognito, Mode, type OffscreenAlias, OffscreenDefinition, type OffscreenMap, type PageAlias, type PageConfig, type PageDefinition, type PageMap, type PageProps, type Plugin, type PluginDefinition, type PopupAlias, type PopupMap, type ReadonlyConfig, RelayDefinition, ServiceDefinition, type SidebarAlias, type SidebarMap, type UserConfig, ViewDefinition, ViewOptions, changeActionIcon, changePopup, changeSidebar, defineBackground, defineCommand, defineConfig, defineContentScript, defineContentScriptAppend, defineExecuteActionCommand, defineOffscreen, definePage, definePlugin, definePopup, defineRelay, defineService, defineSidebar, getApp, getBrowser, getEnv, getIcons, getManifestVersion, getOffscreen, getOffscreens, getPageUrl, getPages, getPopups, getRelay, getService, getSidebars, isBrowser };
|
package/dist/index.js
CHANGED
|
@@ -58,6 +58,13 @@ var ContentScriptAppend = /* @__PURE__ */ ((ContentScriptAppend2) => {
|
|
|
58
58
|
ContentScriptAppend2["After"] = "after";
|
|
59
59
|
return ContentScriptAppend2;
|
|
60
60
|
})(ContentScriptAppend || {});
|
|
61
|
+
var ContentScriptEvent = /* @__PURE__ */ ((ContentScriptEvent2) => {
|
|
62
|
+
ContentScriptEvent2["Mount"] = "mount";
|
|
63
|
+
ContentScriptEvent2["Unmount"] = "unmount";
|
|
64
|
+
ContentScriptEvent2["Add"] = "add";
|
|
65
|
+
ContentScriptEvent2["Remove"] = "remove";
|
|
66
|
+
return ContentScriptEvent2;
|
|
67
|
+
})(ContentScriptEvent || {});
|
|
61
68
|
|
|
62
69
|
// src/entry/content/core/resolvers/mount.ts
|
|
63
70
|
var contentScriptMountAppendResolver = (append) => (anchor, container) => {
|
|
@@ -737,6 +744,7 @@ var ProxyOffscreen_default = class extends ProxyTransport_default {
|
|
|
737
744
|
this.message = new OffscreenMessage(name);
|
|
738
745
|
}
|
|
739
746
|
message;
|
|
747
|
+
url;
|
|
740
748
|
manager() {
|
|
741
749
|
return OffscreenManager.getInstance();
|
|
742
750
|
}
|
|
@@ -747,11 +755,12 @@ var ProxyOffscreen_default = class extends ProxyTransport_default {
|
|
|
747
755
|
};
|
|
748
756
|
if (!isManifestVersion3() || getBrowser() === "firefox" /* Firefox */) {
|
|
749
757
|
await OffscreenBridge.createOffscreen(parameters);
|
|
750
|
-
} else {
|
|
758
|
+
} else if (this.url !== parameters.url) {
|
|
751
759
|
if (await hasOffscreen()) {
|
|
752
760
|
await closeOffscreen();
|
|
753
761
|
}
|
|
754
762
|
await createOffscreen(parameters);
|
|
763
|
+
this.url = parameters.url;
|
|
755
764
|
}
|
|
756
765
|
return this.message.send({ path, args });
|
|
757
766
|
}
|
|
@@ -1006,6 +1015,6 @@ var changeSidebar = async (alias, tab) => {
|
|
|
1006
1015
|
}
|
|
1007
1016
|
};
|
|
1008
1017
|
|
|
1009
|
-
export { Browser, Command, CommandExecuteActionName, ContentScriptAppend, ContentScriptMatches, ManifestIncognito, Mode, OffscreenReason, changeActionIcon, changePopup, changeSidebar, contentScriptMountAppendResolver, defineBackground, defineCommand, defineConfig, defineContentScript, defineContentScriptAppend, defineExecuteActionCommand, defineOffscreen, definePage, definePlugin, definePopup, defineRelay, defineService, defineSidebar, getApp, getBrowser, getEnv, getIcons, getManifestVersion, getOffscreen, getOffscreens, getPageUrl, getPages, getPopups, getRelay, getService, getSidebars, isBrowser, isContentScriptDefinition, isValidContentScriptDefinitionRenderValue };
|
|
1018
|
+
export { Browser, Command, CommandExecuteActionName, ContentScriptAppend, ContentScriptEvent, ContentScriptMatches, ManifestIncognito, Mode, OffscreenReason, changeActionIcon, changePopup, changeSidebar, contentScriptMountAppendResolver, defineBackground, defineCommand, defineConfig, defineContentScript, defineContentScriptAppend, defineExecuteActionCommand, defineOffscreen, definePage, definePlugin, definePopup, defineRelay, defineService, defineSidebar, getApp, getBrowser, getEnv, getIcons, getManifestVersion, getOffscreen, getOffscreens, getPageUrl, getPages, getPopups, getRelay, getService, getSidebars, isBrowser, isContentScriptDefinition, isValidContentScriptDefinitionRenderValue };
|
|
1010
1019
|
//# sourceMappingURL=index.js.map
|
|
1011
1020
|
//# sourceMappingURL=index.js.map
|