browser-extension-manager 1.3.34 → 1.3.35

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.
@@ -77,6 +77,11 @@
77
77
  web_accessible_resources: [
78
78
  ],
79
79
 
80
+ // Offscreen document (for persistent background operations like WebSocket)
81
+ // offscreen_document: {
82
+ // file: 'views/offscreen/index.html',
83
+ // },
84
+
80
85
  // Commands
81
86
  commands: {
82
87
  },
@@ -0,0 +1,4 @@
1
+ // ============================================
2
+ // Offscreen Component Styles
3
+ // ============================================
4
+ // Offscreen documents are invisible, minimal styling needed
@@ -0,0 +1,25 @@
1
+ // ============================================
2
+ // Offscreen Component
3
+ // ============================================
4
+ // Persistent offscreen document for background operations
5
+ // (WebSocket connections, long-running tasks, etc.)
6
+
7
+ // Import Browser Extension Manager
8
+ import Manager from 'browser-extension-manager/offscreen';
9
+
10
+ // Create instance
11
+ const manager = new Manager();
12
+
13
+ // Initialize
14
+ manager.initialize()
15
+ .then(() => {
16
+ // Shortcuts
17
+ const { extension, logger } = manager;
18
+
19
+ // Add your project-specific offscreen logic here
20
+ // This document is invisible and persists in the background
21
+ // ...
22
+
23
+ // Log the initialization
24
+ logger.log('Offscreen initialized!');
25
+ });
@@ -0,0 +1,3 @@
1
+ <!-- Offscreen Document -->
2
+ <!-- This document is invisible and persists for background operations -->
3
+ <div id="offscreen-root"></div>
@@ -0,0 +1,27 @@
1
+ // Libraries
2
+ import extension from './lib/extension.js';
3
+ import LoggerLite from './lib/logger-lite.js';
4
+
5
+ // Class
6
+ class Manager {
7
+ constructor() {
8
+ // Properties
9
+ this.extension = null;
10
+ this.logger = null;
11
+ }
12
+
13
+ async initialize() {
14
+ // Set properties
15
+ this.extension = extension;
16
+ this.logger = new LoggerLite('offscreen');
17
+
18
+ // Log
19
+ this.logger.log('Initialized!', this);
20
+
21
+ // Return manager instance
22
+ return this;
23
+ }
24
+ }
25
+
26
+ // Export
27
+ export default Manager;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-extension-manager",
3
- "version": "1.3.34",
3
+ "version": "1.3.35",
4
4
  "description": "Browser Extension Manager dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -12,6 +12,7 @@
12
12
  "./sidepanel": "./dist/sidepanel.js",
13
13
  "./options": "./dist/options.js",
14
14
  "./page": "./dist/page.js",
15
+ "./offscreen": "./dist/offscreen.js",
15
16
  "./lib/affiliatizer": "./dist/lib/affiliatizer.js",
16
17
  "./lib/extension": "./dist/lib/extension.js",
17
18
  "./lib/logger-lite": "./dist/lib/logger-lite.js",