@xwiki/cristal-electron-settings-renderer 1.2.0 → 1.4.0
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/package.json +11 -8
- package/dist/defaultSettingsStorage.d.ts +0 -11
- package/dist/index.d.cts +0 -7
- package/dist/index.d.ts +0 -7
- package/dist/index.es.js +0 -26
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -2
- package/dist/index.umd.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwiki/cristal-electron-settings-renderer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"license": "LGPL 2.1",
|
|
5
5
|
"author": "XWiki Org Community <contact@xwiki.org>",
|
|
6
6
|
"homepage": "https://cristal.xwiki.org/",
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://jira.xwiki.org/projects/CRISTAL/"
|
|
14
14
|
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=24.0.0"
|
|
17
|
+
},
|
|
15
18
|
"type": "module",
|
|
16
19
|
"exports": {
|
|
17
20
|
".": {
|
|
@@ -28,18 +31,18 @@
|
|
|
28
31
|
"main": "./dist/index.es.js",
|
|
29
32
|
"types": "./dist/index.d.ts",
|
|
30
33
|
"dependencies": {
|
|
31
|
-
"@xwiki/platform-api": "18.
|
|
32
|
-
"@xwiki/cristal-settings-api": "1.
|
|
34
|
+
"@xwiki/platform-api": "18.4.0",
|
|
35
|
+
"@xwiki/cristal-settings-api": "1.4.0"
|
|
33
36
|
},
|
|
34
37
|
"peerDependencies": {
|
|
35
|
-
"inversify": "
|
|
38
|
+
"inversify": "8.x"
|
|
36
39
|
},
|
|
37
40
|
"devDependencies": {
|
|
38
|
-
"@xwiki/platform-dsapi": "18.
|
|
39
|
-
"inversify": "
|
|
41
|
+
"@xwiki/platform-dsapi": "18.4.0",
|
|
42
|
+
"inversify": "8.1.0",
|
|
40
43
|
"typescript": "5.9.3",
|
|
41
|
-
"vite": "7.3.
|
|
42
|
-
"@xwiki/cristal-dev-config": "1.
|
|
44
|
+
"vite": "7.3.2",
|
|
45
|
+
"@xwiki/cristal-dev-config": "1.4.0"
|
|
43
46
|
},
|
|
44
47
|
"scripts": {
|
|
45
48
|
"api-extractor:local": "api-extractor run --local",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SettingsManager, SettingsStorage } from '@xwiki/cristal-settings-api';
|
|
2
|
-
/**
|
|
3
|
-
* Default implementation for {@link SettingsStorage} on Electron.
|
|
4
|
-
* It stores and retrieves settings as JSON from Electron storage.
|
|
5
|
-
* @since 0.18
|
|
6
|
-
* @beta
|
|
7
|
-
*/
|
|
8
|
-
export declare class DefaultSettingsStorage implements SettingsStorage {
|
|
9
|
-
save(settingsManager: SettingsManager): Promise<void>;
|
|
10
|
-
load(settingsManager: SettingsManager): Promise<void>;
|
|
11
|
-
}
|
package/dist/index.d.cts
DELETED
package/dist/index.d.ts
DELETED
package/dist/index.es.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { injectable as l } from "inversify";
|
|
2
|
-
var c = Object.getOwnPropertyDescriptor, g = (t, e, i, s) => {
|
|
3
|
-
for (var n = s > 1 ? void 0 : s ? c(e, i) : e, o = t.length - 1, r; o >= 0; o--)
|
|
4
|
-
(r = t[o]) && (n = r(n) || n);
|
|
5
|
-
return n;
|
|
6
|
-
};
|
|
7
|
-
let a = class {
|
|
8
|
-
async save(t) {
|
|
9
|
-
await window.settings.save(t.toJSON());
|
|
10
|
-
}
|
|
11
|
-
async load(t) {
|
|
12
|
-
t.fromJSON(await window.settings.load() ?? "[]");
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
a = g([
|
|
16
|
-
l()
|
|
17
|
-
], a);
|
|
18
|
-
class S {
|
|
19
|
-
constructor(e) {
|
|
20
|
-
e.bind("SettingsStorage").to(a).inSingletonScope();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
S as ComponentInit
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/defaultSettingsStorage.ts","../src/index.ts"],"sourcesContent":["/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { injectable } from \"inversify\";\nimport type {\n SettingsManager,\n SettingsStorage,\n} from \"@xwiki/cristal-settings-api\";\n\ninterface SettingsWindow extends Window {\n settings: {\n save(settings: string): Promise<void>;\n\n load(): Promise<string>;\n };\n}\ndeclare const window: SettingsWindow;\n\n/**\n * Default implementation for {@link SettingsStorage} on Electron.\n * It stores and retrieves settings as JSON from Electron storage.\n * @since 0.18\n * @beta\n */\n@injectable()\nexport class DefaultSettingsStorage implements SettingsStorage {\n async save(settingsManager: SettingsManager): Promise<void> {\n await window.settings.save(settingsManager.toJSON());\n }\n\n async load(settingsManager: SettingsManager): Promise<void> {\n settingsManager.fromJSON((await window.settings.load()) ?? \"[]\");\n }\n}\n","/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { DefaultSettingsStorage } from \"./defaultSettingsStorage\";\nimport { Container } from \"inversify\";\nimport type { SettingsStorage } from \"@xwiki/cristal-settings-api\";\n\n/**\n * @beta\n */\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<SettingsStorage>(\"SettingsStorage\")\n .to(DefaultSettingsStorage)\n .inSingletonScope();\n }\n}\n"],"names":["DefaultSettingsStorage","settingsManager","__decorateClass","injectable","ComponentInit","container"],"mappings":";;;;;;AA0CO,IAAMA,IAAN,MAAwD;AAAA,EAC7D,MAAM,KAAKC,GAAiD;AAC1D,UAAM,OAAO,SAAS,KAAKA,EAAgB,QAAQ;AAAA,EACrD;AAAA,EAEA,MAAM,KAAKA,GAAiD;AAC1D,IAAAA,EAAgB,SAAU,MAAM,OAAO,SAAS,KAAA,KAAW,IAAI;AAAA,EACjE;AACF;AARaD,IAANE,EAAA;AAAA,EADNC,EAAA;AAAW,GACCH,CAAA;ACfN,MAAMI,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAChC,IAAAA,EACG,KAAsB,iBAAiB,EACvC,GAAGL,CAAsB,EACzB,iBAAA;AAAA,EACL;AACF;"}
|
package/dist/index.umd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("inversify")):typeof define=="function"&&define.amd?define(["exports","inversify"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e["cristal_settings-renderer"]={},e.inversify))})(this,(function(e,n){"use strict";var d=Object.getOwnPropertyDescriptor,c=(t,i,u,a)=>{for(var s=a>1?void 0:a?d(i,u):i,r=t.length-1,f;r>=0;r--)(f=t[r])&&(s=f(s)||s);return s};let o=class{async save(t){await window.settings.save(t.toJSON())}async load(t){t.fromJSON(await window.settings.load()??"[]")}};o=c([n.injectable()],o);class l{constructor(i){i.bind("SettingsStorage").to(o).inSingletonScope()}}e.ComponentInit=l,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
2
|
-
//# sourceMappingURL=index.umd.js.map
|
package/dist/index.umd.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../src/defaultSettingsStorage.ts","../src/index.ts"],"sourcesContent":["/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { injectable } from \"inversify\";\nimport type {\n SettingsManager,\n SettingsStorage,\n} from \"@xwiki/cristal-settings-api\";\n\ninterface SettingsWindow extends Window {\n settings: {\n save(settings: string): Promise<void>;\n\n load(): Promise<string>;\n };\n}\ndeclare const window: SettingsWindow;\n\n/**\n * Default implementation for {@link SettingsStorage} on Electron.\n * It stores and retrieves settings as JSON from Electron storage.\n * @since 0.18\n * @beta\n */\n@injectable()\nexport class DefaultSettingsStorage implements SettingsStorage {\n async save(settingsManager: SettingsManager): Promise<void> {\n await window.settings.save(settingsManager.toJSON());\n }\n\n async load(settingsManager: SettingsManager): Promise<void> {\n settingsManager.fromJSON((await window.settings.load()) ?? \"[]\");\n }\n}\n","/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { DefaultSettingsStorage } from \"./defaultSettingsStorage\";\nimport { Container } from \"inversify\";\nimport type { SettingsStorage } from \"@xwiki/cristal-settings-api\";\n\n/**\n * @beta\n */\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<SettingsStorage>(\"SettingsStorage\")\n .to(DefaultSettingsStorage)\n .inSingletonScope();\n }\n}\n"],"names":["DefaultSettingsStorage","settingsManager","__decorateClass","injectable","ComponentInit","container"],"mappings":"gbA0CO,IAAMA,EAAN,KAAwD,CAC7D,MAAM,KAAKC,EAAiD,CAC1D,MAAM,OAAO,SAAS,KAAKA,EAAgB,QAAQ,CACrD,CAEA,MAAM,KAAKA,EAAiD,CAC1DA,EAAgB,SAAU,MAAM,OAAO,SAAS,KAAA,GAAW,IAAI,CACjE,CACF,EARaD,EAANE,EAAA,CADNC,EAAAA,WAAA,CAAW,EACCH,CAAA,ECfN,MAAMI,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EACG,KAAsB,iBAAiB,EACvC,GAAGL,CAAsB,EACzB,iBAAA,CACL,CACF"}
|