@vacantthinker/firefox-addon-framework-easy 2026.625.554 → 2026.625.1200

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.
@@ -0,0 +1,15 @@
1
+ import { BaseORM } from './BaseORM';
2
+ /**
3
+ * Abstract class for ORMs that store Map<string, V> data.
4
+ * Automatically handles the conversion between internal
5
+ * Record<string, V> and Map<string, V>.
6
+ */
7
+ export declare abstract class BaseOneBooleanORM extends BaseORM<Record<string, boolean>> {
8
+ private readonly state;
9
+ protected constructor(prefix: string, id: string);
10
+ getValue(): Promise<boolean>;
11
+ setValue(value: boolean): Promise<void>;
12
+ private getMap;
13
+ private setMap;
14
+ }
15
+ //# sourceMappingURL=BaseOneBooleanORM.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseOneBooleanORM.d.ts","sourceRoot":"","sources":["../src/BaseOneBooleanORM.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;GAIG;AACH,8BAAsB,iBAAkB,SAAQ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9E,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmB;IAEzC,SAAS,aAAa,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IAKnC,QAAQ;IAKR,QAAQ,CAAC,KAAK,EAAE,OAAO;YAMtB,MAAM;YAKN,MAAM;CAGrB"}
@@ -0,0 +1,29 @@
1
+ import { BaseORM } from './BaseORM';
2
+ /**
3
+ * Abstract class for ORMs that store Map<string, V> data.
4
+ * Automatically handles the conversion between internal
5
+ * Record<string, V> and Map<string, V>.
6
+ */
7
+ export class BaseOneBooleanORM extends BaseORM {
8
+ state = "state";
9
+ constructor(prefix, id) {
10
+ super(prefix, id, { "state": false });
11
+ // todo here cannot use this.state, why?
12
+ }
13
+ async getValue() {
14
+ const map = await this.getMap();
15
+ return map.get(this.state) || false;
16
+ }
17
+ async setValue(value) {
18
+ const map = await this.getMap();
19
+ map.set(this.state, value);
20
+ await this.setMap(map);
21
+ }
22
+ async getMap() {
23
+ const data = await this.get();
24
+ return new Map(Object.entries(data || {}));
25
+ }
26
+ async setMap(map) {
27
+ await this.set(Object.fromEntries(map));
28
+ }
29
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './backgroundJs';
2
2
  export * from './BaseNumberKeyORM';
3
+ export * from './BaseOneBooleanORM';
3
4
  export * from './BaseORM';
4
5
  export * from './BaseStringKeyORM';
5
6
  export * from './browserBrowsingData';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './backgroundJs';
2
2
  export * from './BaseNumberKeyORM';
3
+ export * from './BaseOneBooleanORM';
3
4
  export * from './BaseORM';
4
5
  export * from './BaseStringKeyORM';
5
6
  export * from './browserBrowsingData';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vacantthinker/firefox-addon-framework-easy",
3
- "version": "2026.0625.0554",
3
+ "version": "2026.0625.1200",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",