@bytechain.cn/colamd 1.5.0 → 1.5.1-beta.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/.trae/specs/optimize-theme-loading/checklist.md +20 -0
- package/.trae/specs/optimize-theme-loading/spec.md +103 -0
- package/.trae/specs/optimize-theme-loading/tasks.md +40 -0
- package/CHANGELOG.md +323 -0
- package/CLAUDE.md +56 -0
- package/README.md +422 -26
- package/README_CN.md +480 -28
- package/android/app/build/.npmkeep +0 -0
- package/android/app/build.gradle +76 -0
- package/android/app/capacitor.build.gradle +24 -0
- package/android/app/proguard-rules.pro +21 -0
- package/android/app/release.keystore +0 -0
- package/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +26 -0
- package/android/app/src/main/AndroidManifest.xml +64 -0
- package/android/app/src/main/java/cn/bytechain/colamd/MainActivity.java +180 -0
- package/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/android/app/src/main/res/drawable/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
- package/android/app/src/main/res/layout/activity_main.xml +12 -0
- package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/values/ic_launcher_background.xml +4 -0
- package/android/app/src/main/res/values/strings.xml +7 -0
- package/android/app/src/main/res/values/styles.xml +22 -0
- package/android/app/src/main/res/xml/file_paths.xml +5 -0
- package/android/app/src/main/res/xml/network_security_config.xml +8 -0
- package/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +18 -0
- package/android/build.gradle +29 -0
- package/android/capacitor.settings.gradle +21 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/android/gradle.properties +22 -0
- package/android/gradlew +248 -0
- package/android/gradlew.bat +92 -0
- package/android/settings.gradle +5 -0
- package/android/variables.gradle +16 -0
- package/bytechain.cn-colamd-1.5.1-beta.2.tgz +0 -0
- package/capacitor.config.js +29 -0
- package/capacitor.config.ts +30 -0
- package/demo.md +191 -484
- package/dist/main/index.js +77 -46
- package/dist/renderer/assets/{arc-tTbbM8LO.js → arc-CPdeInCG.js} +1 -1
- package/dist/renderer/assets/{architectureDiagram-3BPJPVTR-CEgYow6c.js → architectureDiagram-3BPJPVTR-BAbnaR9G.js} +4 -3
- package/dist/renderer/assets/{blockDiagram-GPEHLZMM-LHyVtPwW.js → blockDiagram-GPEHLZMM-CYSWjnJg.js} +5 -4
- package/dist/renderer/assets/{c4Diagram-AAUBKEIU-C1P1eJrf.js → c4Diagram-AAUBKEIU-Rb1tstnr.js} +3 -2
- package/dist/renderer/assets/{channel-upve91Tq.js → channel-DpG2A6fE.js} +1 -1
- package/dist/renderer/assets/{chunk-2J33WTMH-lag2vhq9.js → chunk-2J33WTMH-DFc0Jxy_.js} +1 -1
- package/dist/renderer/assets/{chunk-4BX2VUAB-BXJ8Ggh-.js → chunk-4BX2VUAB-BhRxDTNn.js} +1 -1
- package/dist/renderer/assets/{chunk-55IACEB6-CiBpxRa1.js → chunk-55IACEB6-DEgMVBk8.js} +1 -1
- package/dist/renderer/assets/{chunk-727SXJPM-ODeKQFXC.js → chunk-727SXJPM-bjBIfiz8.js} +5 -5
- package/dist/renderer/assets/{chunk-AQP2D5EJ-BK7xJolB.js → chunk-AQP2D5EJ-DwQMzTzD.js} +3 -3
- package/dist/renderer/assets/{chunk-FMBD7UC4-BxpCZPtz.js → chunk-FMBD7UC4-CkphwJzs.js} +1 -1
- package/dist/renderer/assets/{chunk-ND2GUHAM-CqqaU9Ue.js → chunk-ND2GUHAM-oU09z4y4.js} +1 -1
- package/dist/renderer/assets/{chunk-QZHKN3VN-Biq_K124.js → chunk-QZHKN3VN-rCbVuPBn.js} +1 -1
- package/dist/renderer/assets/{classDiagram-v2-Q7XG4LA2-Cq95X99o.js → classDiagram-4FO5ZUOK-DGS2faoM.js} +7 -6
- package/dist/renderer/assets/{classDiagram-4FO5ZUOK-Cq95X99o.js → classDiagram-v2-Q7XG4LA2-DGS2faoM.js} +7 -6
- package/dist/renderer/assets/{cose-bilkent-S5V4N54A-XasiD0bu.js → cose-bilkent-S5V4N54A-iqY6-EwA.js} +2 -1
- package/dist/renderer/assets/{dagre-BM42HDAG-Nq84Gfx4.js → dagre-BM42HDAG-5t3X5sDa.js} +4 -3
- package/dist/renderer/assets/{diagram-2AECGRRQ-DwuB1GWt.js → diagram-2AECGRRQ-DzHiYDPh.js} +4 -3
- package/dist/renderer/assets/{diagram-5GNKFQAL-C2tgeI1h.js → diagram-5GNKFQAL-BiNv6Keq.js} +5 -4
- package/dist/renderer/assets/{diagram-KO2AKTUF-D5KzjNBc.js → diagram-KO2AKTUF-ClzeDG6f.js} +4 -3
- package/dist/renderer/assets/{diagram-LMA3HP47-C12xHS1c.js → diagram-LMA3HP47-CGkw7wII.js} +4 -3
- package/dist/renderer/assets/{diagram-OG6HWLK6-CnxI9oEa.js → diagram-OG6HWLK6-Dl-Hyk1_.js} +5 -4
- package/dist/renderer/assets/{erDiagram-TEJ5UH35-D_uPaKwn.js → erDiagram-TEJ5UH35-BxUN79Qb.js} +5 -4
- package/dist/renderer/assets/{flowDiagram-I6XJVG4X-B6q_1-tE.js → flowDiagram-I6XJVG4X-CzFk-KNI.js} +7 -6
- package/dist/renderer/assets/{ganttDiagram-6RSMTGT7-CFo7ifF9.js → ganttDiagram-6RSMTGT7-C2xl6Igx.js} +3 -2
- package/dist/renderer/assets/{gitGraphDiagram-PVQCEYII-WSexHTnq.js → gitGraphDiagram-PVQCEYII-_fn7XCa7.js} +5 -4
- package/dist/renderer/assets/{graph-DyX_9f6d.js → graph-CDoHYrHm.js} +1 -1
- package/dist/renderer/assets/index-B4uDgADr.js +530 -0
- package/dist/renderer/assets/index-CBcVpA3d.js +30 -0
- package/dist/renderer/assets/index-CGj1spkU.js +27 -0
- package/dist/renderer/assets/{index-dyHEFYvY.css → index-CeFpoCKV.css} +443 -400
- package/dist/renderer/assets/index-D4CPFkph.js +9 -0
- package/dist/renderer/assets/{index-DW7LS8C1.js → index-DAlXyxzt.js} +1183 -346
- package/dist/renderer/assets/index-DxOzbfR-.js +110 -0
- package/dist/renderer/assets/index-Y89U1ptl.js +9 -0
- package/dist/renderer/assets/{infoDiagram-5YYISTIA-DaeJdLRq.js → infoDiagram-5YYISTIA-DL6XIxLz.js} +3 -2
- package/dist/renderer/assets/{ishikawaDiagram-YF4QCWOH-DDCZc35f.js → ishikawaDiagram-YF4QCWOH-BUZLjRo-.js} +2 -1
- package/dist/renderer/assets/{journeyDiagram-JHISSGLW-BEdmpAgl.js → journeyDiagram-JHISSGLW-C4rH_mQM.js} +5 -4
- package/dist/renderer/assets/{kanban-definition-UN3LZRKU-BEFtQcFb.js → kanban-definition-UN3LZRKU-DRbrBcWV.js} +3 -2
- package/dist/renderer/assets/{layout-CAJgQHdw.js → layout-DZl4n4qu.js} +2 -2
- package/dist/renderer/assets/{linear-B2ggJ8Am.js → linear-B0Krxg21.js} +1 -1
- package/dist/renderer/assets/{mindmap-definition-RKZ34NQL-DSxVgHB5.js → mindmap-definition-RKZ34NQL-DdmPsWrn.js} +4 -3
- package/dist/renderer/assets/{pieDiagram-4H26LBE5-CwYoJBuL.js → pieDiagram-4H26LBE5-BPZLqwG0.js} +5 -4
- package/dist/renderer/assets/preload-helper-tXtZnHb0.js +88 -0
- package/dist/renderer/assets/{quadrantDiagram-W4KKPZXB-CST9Fvg9.js → quadrantDiagram-W4KKPZXB-Dr-oWRk9.js} +3 -2
- package/dist/renderer/assets/{requirementDiagram-4Y6WPE33-DtrH52jS.js → requirementDiagram-4Y6WPE33-B6QZd0lo.js} +4 -3
- package/dist/renderer/assets/{sankeyDiagram-5OEKKPKP-ca1tPzJ_.js → sankeyDiagram-5OEKKPKP-Cyl9ojEt.js} +2 -1
- package/dist/renderer/assets/{sequenceDiagram-3UESZ5HK-Dfp1EJZ7.js → sequenceDiagram-3UESZ5HK-D48Yr9T6.js} +4 -3
- package/dist/renderer/assets/{stateDiagram-AJRCARHV-Bha2QoNB.js → stateDiagram-AJRCARHV-qyb8ETsa.js} +7 -6
- package/dist/renderer/assets/{stateDiagram-v2-BHNVJYJU-DWgFUYu1.js → stateDiagram-v2-BHNVJYJU-DmDOyyrJ.js} +5 -4
- package/dist/renderer/assets/{timeline-definition-PNZ67QCA-C3h_-OTj.js → timeline-definition-PNZ67QCA-C-KQxTi1.js} +3 -2
- package/dist/renderer/assets/{vennDiagram-CIIHVFJN-DFzjSrZi.js → vennDiagram-CIIHVFJN-BdaZlnH-.js} +2 -1
- package/dist/renderer/assets/{wardley-L42UT6IY-Cx-VbqoS.js → wardley-L42UT6IY-b-_GPpqL.js} +1 -1
- package/dist/renderer/assets/{wardleyDiagram-YWT4CUSO-S2D9XqX6.js → wardleyDiagram-YWT4CUSO-B2hBE-EE.js} +4 -3
- package/dist/renderer/assets/web-BKE0SH0E.js +36 -0
- package/dist/renderer/assets/web-CBsFp24u.js +564 -0
- package/dist/renderer/assets/web-Dc8YgoHP.js +24 -0
- package/dist/renderer/assets/web-TfDzToU7.js +58 -0
- package/dist/renderer/assets/{xychartDiagram-2RQKCTM6-Cfxigbts.js → xychartDiagram-2RQKCTM6-CSvswDTY.js} +3 -2
- package/dist/renderer/index.html +62 -3
- package/docs/academic-demo.md +566 -0
- package/docs/demo.html +748 -0
- package/docs/demo.md +546 -0
- package/docs/demo.pdf +0 -0
- package/docs/theme-paradigm.md +658 -0
- package/electron-builder.yml +7 -0
- package/electron.vite.config.js +31 -0
- package/electron.vite.config.ts +1 -1
- package/ios/App/App/AppDelegate.swift +49 -0
- package/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
- package/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/ios/App/App/Assets.xcassets/Contents.json +6 -0
- package/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
- package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
- package/ios/App/App/Base.lproj/Main.storyboard +19 -0
- package/ios/App/App/Info.plist +49 -0
- package/ios/App/App.xcodeproj/project.pbxproj +408 -0
- package/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/App/Podfile +28 -0
- package/package.json +23 -3
- package/resources/templates/slides/template-forest-ink.html +540 -0
- package/scripts/generate-icons.js +102 -0
- package/src/main/index.ts +87 -63
- package/src/preload/index.d.ts +51 -0
- package/src/preload/index.js +70 -0
- package/src/renderer/capacitor-api.ts +713 -0
- package/src/renderer/editor/editor.ts +87 -4
- package/src/renderer/editor/plugins/index.ts +24 -32
- package/src/renderer/editor/plugins/math-plugin.ts +1 -1
- package/src/renderer/editor/plugins/mermaid-plugin-custom.css +13 -398
- package/src/renderer/editor/plugins/mermaid-plugin.ts +62 -71
- package/src/renderer/editor/plugins/themes/base/dark.css +23 -0
- package/src/renderer/editor/plugins/themes/base/elegant.css +32 -0
- package/src/renderer/editor/plugins/themes/base/light.css +20 -0
- package/src/renderer/editor/plugins/themes/base/newsprint.css +27 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/academic.css +43 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/dark.css +20 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/elegant.css +24 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/light.css +21 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/newsprint.css +26 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/variables.css +592 -0
- package/src/renderer/editor/plugins/themes/foundation.css +143 -0
- package/src/renderer/editor/plugins/themes/theme-manager.ts +92 -0
- package/src/renderer/env.d.ts +4 -1
- package/src/renderer/index.html +59 -1
- package/src/renderer/main.ts +432 -57
- package/src/renderer/mobile.css +429 -0
- package/themes/README.md +3 -0
- package/themes/academic-paper.css +1321 -0
- package/themes/elegant.css +14 -7
- package/themes/forest-ink.css +664 -0
- package/themes/pixso-design.css +1261 -0
- package/themes/swiss-design.css +596 -0
- package/themes/template.css +498 -0
- package/tsconfig.main.json +1 -0
- package/tsconfig.main.tsbuildinfo +1 -0
- package/tsconfig.preload.json +1 -0
- package/tsconfig.preload.tsbuildinfo +1 -0
- package/tsconfig.renderer.json +1 -0
- package/tsconfig.renderer.tsbuildinfo +1 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/.trae/documents/fix-mermaid-colors-and-sankey.md +0 -50
- package/src/renderer/themes/theme-manager.ts +0 -40
- /package/src/renderer/{themes → editor/plugins/themes}/base.css +0 -0
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
/*! Capacitor: https://capacitorjs.com/ - MIT License */
|
|
2
|
+
const createCapacitorPlatforms = (win) => {
|
|
3
|
+
const defaultPlatformMap = /* @__PURE__ */ new Map();
|
|
4
|
+
defaultPlatformMap.set("web", { name: "web" });
|
|
5
|
+
const capPlatforms = win.CapacitorPlatforms || {
|
|
6
|
+
currentPlatform: { name: "web" },
|
|
7
|
+
platforms: defaultPlatformMap
|
|
8
|
+
};
|
|
9
|
+
const addPlatform = (name, platform) => {
|
|
10
|
+
capPlatforms.platforms.set(name, platform);
|
|
11
|
+
};
|
|
12
|
+
const setPlatform = (name) => {
|
|
13
|
+
if (capPlatforms.platforms.has(name)) {
|
|
14
|
+
capPlatforms.currentPlatform = capPlatforms.platforms.get(name);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
capPlatforms.addPlatform = addPlatform;
|
|
18
|
+
capPlatforms.setPlatform = setPlatform;
|
|
19
|
+
return capPlatforms;
|
|
20
|
+
};
|
|
21
|
+
const initPlatforms = (win) => win.CapacitorPlatforms = createCapacitorPlatforms(win);
|
|
22
|
+
const CapacitorPlatforms = /* @__PURE__ */ initPlatforms(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
23
|
+
CapacitorPlatforms.addPlatform;
|
|
24
|
+
CapacitorPlatforms.setPlatform;
|
|
25
|
+
var ExceptionCode;
|
|
26
|
+
(function(ExceptionCode2) {
|
|
27
|
+
ExceptionCode2["Unimplemented"] = "UNIMPLEMENTED";
|
|
28
|
+
ExceptionCode2["Unavailable"] = "UNAVAILABLE";
|
|
29
|
+
})(ExceptionCode || (ExceptionCode = {}));
|
|
30
|
+
class CapacitorException extends Error {
|
|
31
|
+
constructor(message, code, data) {
|
|
32
|
+
super(message);
|
|
33
|
+
this.message = message;
|
|
34
|
+
this.code = code;
|
|
35
|
+
this.data = data;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const getPlatformId = (win) => {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
if (win === null || win === void 0 ? void 0 : win.androidBridge) {
|
|
41
|
+
return "android";
|
|
42
|
+
} else if ((_b = (_a = win === null || win === void 0 ? void 0 : win.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.bridge) {
|
|
43
|
+
return "ios";
|
|
44
|
+
} else {
|
|
45
|
+
return "web";
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const createCapacitor = (win) => {
|
|
49
|
+
var _a, _b, _c, _d, _e;
|
|
50
|
+
const capCustomPlatform = win.CapacitorCustomPlatform || null;
|
|
51
|
+
const cap = win.Capacitor || {};
|
|
52
|
+
const Plugins = cap.Plugins = cap.Plugins || {};
|
|
53
|
+
const capPlatforms = win.CapacitorPlatforms;
|
|
54
|
+
const defaultGetPlatform = () => {
|
|
55
|
+
return capCustomPlatform !== null ? capCustomPlatform.name : getPlatformId(win);
|
|
56
|
+
};
|
|
57
|
+
const getPlatform = ((_a = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _a === void 0 ? void 0 : _a.getPlatform) || defaultGetPlatform;
|
|
58
|
+
const defaultIsNativePlatform = () => getPlatform() !== "web";
|
|
59
|
+
const isNativePlatform = ((_b = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _b === void 0 ? void 0 : _b.isNativePlatform) || defaultIsNativePlatform;
|
|
60
|
+
const defaultIsPluginAvailable = (pluginName) => {
|
|
61
|
+
const plugin = registeredPlugins.get(pluginName);
|
|
62
|
+
if (plugin === null || plugin === void 0 ? void 0 : plugin.platforms.has(getPlatform())) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
if (getPluginHeader(pluginName)) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
};
|
|
70
|
+
const isPluginAvailable = ((_c = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _c === void 0 ? void 0 : _c.isPluginAvailable) || defaultIsPluginAvailable;
|
|
71
|
+
const defaultGetPluginHeader = (pluginName) => {
|
|
72
|
+
var _a2;
|
|
73
|
+
return (_a2 = cap.PluginHeaders) === null || _a2 === void 0 ? void 0 : _a2.find((h) => h.name === pluginName);
|
|
74
|
+
};
|
|
75
|
+
const getPluginHeader = ((_d = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _d === void 0 ? void 0 : _d.getPluginHeader) || defaultGetPluginHeader;
|
|
76
|
+
const handleError = (err) => win.console.error(err);
|
|
77
|
+
const pluginMethodNoop = (_target, prop, pluginName) => {
|
|
78
|
+
return Promise.reject(`${pluginName} does not have an implementation of "${prop}".`);
|
|
79
|
+
};
|
|
80
|
+
const registeredPlugins = /* @__PURE__ */ new Map();
|
|
81
|
+
const defaultRegisterPlugin = (pluginName, jsImplementations = {}) => {
|
|
82
|
+
const registeredPlugin = registeredPlugins.get(pluginName);
|
|
83
|
+
if (registeredPlugin) {
|
|
84
|
+
console.warn(`Capacitor plugin "${pluginName}" already registered. Cannot register plugins twice.`);
|
|
85
|
+
return registeredPlugin.proxy;
|
|
86
|
+
}
|
|
87
|
+
const platform = getPlatform();
|
|
88
|
+
const pluginHeader = getPluginHeader(pluginName);
|
|
89
|
+
let jsImplementation;
|
|
90
|
+
const loadPluginImplementation = async () => {
|
|
91
|
+
if (!jsImplementation && platform in jsImplementations) {
|
|
92
|
+
jsImplementation = typeof jsImplementations[platform] === "function" ? jsImplementation = await jsImplementations[platform]() : jsImplementation = jsImplementations[platform];
|
|
93
|
+
} else if (capCustomPlatform !== null && !jsImplementation && "web" in jsImplementations) {
|
|
94
|
+
jsImplementation = typeof jsImplementations["web"] === "function" ? jsImplementation = await jsImplementations["web"]() : jsImplementation = jsImplementations["web"];
|
|
95
|
+
}
|
|
96
|
+
return jsImplementation;
|
|
97
|
+
};
|
|
98
|
+
const createPluginMethod = (impl, prop) => {
|
|
99
|
+
var _a2, _b2;
|
|
100
|
+
if (pluginHeader) {
|
|
101
|
+
const methodHeader = pluginHeader === null || pluginHeader === void 0 ? void 0 : pluginHeader.methods.find((m) => prop === m.name);
|
|
102
|
+
if (methodHeader) {
|
|
103
|
+
if (methodHeader.rtype === "promise") {
|
|
104
|
+
return (options) => cap.nativePromise(pluginName, prop.toString(), options);
|
|
105
|
+
} else {
|
|
106
|
+
return (options, callback) => cap.nativeCallback(pluginName, prop.toString(), options, callback);
|
|
107
|
+
}
|
|
108
|
+
} else if (impl) {
|
|
109
|
+
return (_a2 = impl[prop]) === null || _a2 === void 0 ? void 0 : _a2.bind(impl);
|
|
110
|
+
}
|
|
111
|
+
} else if (impl) {
|
|
112
|
+
return (_b2 = impl[prop]) === null || _b2 === void 0 ? void 0 : _b2.bind(impl);
|
|
113
|
+
} else {
|
|
114
|
+
throw new CapacitorException(`"${pluginName}" plugin is not implemented on ${platform}`, ExceptionCode.Unimplemented);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
const createPluginMethodWrapper = (prop) => {
|
|
118
|
+
let remove;
|
|
119
|
+
const wrapper = (...args) => {
|
|
120
|
+
const p = loadPluginImplementation().then((impl) => {
|
|
121
|
+
const fn = createPluginMethod(impl, prop);
|
|
122
|
+
if (fn) {
|
|
123
|
+
const p2 = fn(...args);
|
|
124
|
+
remove = p2 === null || p2 === void 0 ? void 0 : p2.remove;
|
|
125
|
+
return p2;
|
|
126
|
+
} else {
|
|
127
|
+
throw new CapacitorException(`"${pluginName}.${prop}()" is not implemented on ${platform}`, ExceptionCode.Unimplemented);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
if (prop === "addListener") {
|
|
131
|
+
p.remove = async () => remove();
|
|
132
|
+
}
|
|
133
|
+
return p;
|
|
134
|
+
};
|
|
135
|
+
wrapper.toString = () => `${prop.toString()}() { [capacitor code] }`;
|
|
136
|
+
Object.defineProperty(wrapper, "name", {
|
|
137
|
+
value: prop,
|
|
138
|
+
writable: false,
|
|
139
|
+
configurable: false
|
|
140
|
+
});
|
|
141
|
+
return wrapper;
|
|
142
|
+
};
|
|
143
|
+
const addListener = createPluginMethodWrapper("addListener");
|
|
144
|
+
const removeListener = createPluginMethodWrapper("removeListener");
|
|
145
|
+
const addListenerNative = (eventName, callback) => {
|
|
146
|
+
const call = addListener({ eventName }, callback);
|
|
147
|
+
const remove = async () => {
|
|
148
|
+
const callbackId = await call;
|
|
149
|
+
removeListener({
|
|
150
|
+
eventName,
|
|
151
|
+
callbackId
|
|
152
|
+
}, callback);
|
|
153
|
+
};
|
|
154
|
+
const p = new Promise((resolve) => call.then(() => resolve({ remove })));
|
|
155
|
+
p.remove = async () => {
|
|
156
|
+
console.warn(`Using addListener() without 'await' is deprecated.`);
|
|
157
|
+
await remove();
|
|
158
|
+
};
|
|
159
|
+
return p;
|
|
160
|
+
};
|
|
161
|
+
const proxy = new Proxy({}, {
|
|
162
|
+
get(_, prop) {
|
|
163
|
+
switch (prop) {
|
|
164
|
+
// https://github.com/facebook/react/issues/20030
|
|
165
|
+
case "$$typeof":
|
|
166
|
+
return void 0;
|
|
167
|
+
case "toJSON":
|
|
168
|
+
return () => ({});
|
|
169
|
+
case "addListener":
|
|
170
|
+
return pluginHeader ? addListenerNative : addListener;
|
|
171
|
+
case "removeListener":
|
|
172
|
+
return removeListener;
|
|
173
|
+
default:
|
|
174
|
+
return createPluginMethodWrapper(prop);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
Plugins[pluginName] = proxy;
|
|
179
|
+
registeredPlugins.set(pluginName, {
|
|
180
|
+
name: pluginName,
|
|
181
|
+
proxy,
|
|
182
|
+
platforms: /* @__PURE__ */ new Set([
|
|
183
|
+
...Object.keys(jsImplementations),
|
|
184
|
+
...pluginHeader ? [platform] : []
|
|
185
|
+
])
|
|
186
|
+
});
|
|
187
|
+
return proxy;
|
|
188
|
+
};
|
|
189
|
+
const registerPlugin2 = ((_e = capPlatforms === null || capPlatforms === void 0 ? void 0 : capPlatforms.currentPlatform) === null || _e === void 0 ? void 0 : _e.registerPlugin) || defaultRegisterPlugin;
|
|
190
|
+
if (!cap.convertFileSrc) {
|
|
191
|
+
cap.convertFileSrc = (filePath) => filePath;
|
|
192
|
+
}
|
|
193
|
+
cap.getPlatform = getPlatform;
|
|
194
|
+
cap.handleError = handleError;
|
|
195
|
+
cap.isNativePlatform = isNativePlatform;
|
|
196
|
+
cap.isPluginAvailable = isPluginAvailable;
|
|
197
|
+
cap.pluginMethodNoop = pluginMethodNoop;
|
|
198
|
+
cap.registerPlugin = registerPlugin2;
|
|
199
|
+
cap.Exception = CapacitorException;
|
|
200
|
+
cap.DEBUG = !!cap.DEBUG;
|
|
201
|
+
cap.isLoggingEnabled = !!cap.isLoggingEnabled;
|
|
202
|
+
cap.platform = cap.getPlatform();
|
|
203
|
+
cap.isNative = cap.isNativePlatform();
|
|
204
|
+
return cap;
|
|
205
|
+
};
|
|
206
|
+
const initCapacitorGlobal = (win) => win.Capacitor = createCapacitor(win);
|
|
207
|
+
const Capacitor = /* @__PURE__ */ initCapacitorGlobal(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
208
|
+
const registerPlugin = Capacitor.registerPlugin;
|
|
209
|
+
Capacitor.Plugins;
|
|
210
|
+
class WebPlugin {
|
|
211
|
+
constructor(config) {
|
|
212
|
+
this.listeners = {};
|
|
213
|
+
this.retainedEventArguments = {};
|
|
214
|
+
this.windowListeners = {};
|
|
215
|
+
if (config) {
|
|
216
|
+
console.warn(`Capacitor WebPlugin "${config.name}" config object was deprecated in v3 and will be removed in v4.`);
|
|
217
|
+
this.config = config;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
addListener(eventName, listenerFunc) {
|
|
221
|
+
let firstListener = false;
|
|
222
|
+
const listeners = this.listeners[eventName];
|
|
223
|
+
if (!listeners) {
|
|
224
|
+
this.listeners[eventName] = [];
|
|
225
|
+
firstListener = true;
|
|
226
|
+
}
|
|
227
|
+
this.listeners[eventName].push(listenerFunc);
|
|
228
|
+
const windowListener = this.windowListeners[eventName];
|
|
229
|
+
if (windowListener && !windowListener.registered) {
|
|
230
|
+
this.addWindowListener(windowListener);
|
|
231
|
+
}
|
|
232
|
+
if (firstListener) {
|
|
233
|
+
this.sendRetainedArgumentsForEvent(eventName);
|
|
234
|
+
}
|
|
235
|
+
const remove = async () => this.removeListener(eventName, listenerFunc);
|
|
236
|
+
const p = Promise.resolve({ remove });
|
|
237
|
+
return p;
|
|
238
|
+
}
|
|
239
|
+
async removeAllListeners() {
|
|
240
|
+
this.listeners = {};
|
|
241
|
+
for (const listener in this.windowListeners) {
|
|
242
|
+
this.removeWindowListener(this.windowListeners[listener]);
|
|
243
|
+
}
|
|
244
|
+
this.windowListeners = {};
|
|
245
|
+
}
|
|
246
|
+
notifyListeners(eventName, data, retainUntilConsumed) {
|
|
247
|
+
const listeners = this.listeners[eventName];
|
|
248
|
+
if (!listeners) {
|
|
249
|
+
if (retainUntilConsumed) {
|
|
250
|
+
let args = this.retainedEventArguments[eventName];
|
|
251
|
+
if (!args) {
|
|
252
|
+
args = [];
|
|
253
|
+
}
|
|
254
|
+
args.push(data);
|
|
255
|
+
this.retainedEventArguments[eventName] = args;
|
|
256
|
+
}
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
listeners.forEach((listener) => listener(data));
|
|
260
|
+
}
|
|
261
|
+
hasListeners(eventName) {
|
|
262
|
+
return !!this.listeners[eventName].length;
|
|
263
|
+
}
|
|
264
|
+
registerWindowListener(windowEventName, pluginEventName) {
|
|
265
|
+
this.windowListeners[pluginEventName] = {
|
|
266
|
+
registered: false,
|
|
267
|
+
windowEventName,
|
|
268
|
+
pluginEventName,
|
|
269
|
+
handler: (event) => {
|
|
270
|
+
this.notifyListeners(pluginEventName, event);
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
unimplemented(msg = "not implemented") {
|
|
275
|
+
return new Capacitor.Exception(msg, ExceptionCode.Unimplemented);
|
|
276
|
+
}
|
|
277
|
+
unavailable(msg = "not available") {
|
|
278
|
+
return new Capacitor.Exception(msg, ExceptionCode.Unavailable);
|
|
279
|
+
}
|
|
280
|
+
async removeListener(eventName, listenerFunc) {
|
|
281
|
+
const listeners = this.listeners[eventName];
|
|
282
|
+
if (!listeners) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
const index = listeners.indexOf(listenerFunc);
|
|
286
|
+
this.listeners[eventName].splice(index, 1);
|
|
287
|
+
if (!this.listeners[eventName].length) {
|
|
288
|
+
this.removeWindowListener(this.windowListeners[eventName]);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
addWindowListener(handle) {
|
|
292
|
+
window.addEventListener(handle.windowEventName, handle.handler);
|
|
293
|
+
handle.registered = true;
|
|
294
|
+
}
|
|
295
|
+
removeWindowListener(handle) {
|
|
296
|
+
if (!handle) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
window.removeEventListener(handle.windowEventName, handle.handler);
|
|
300
|
+
handle.registered = false;
|
|
301
|
+
}
|
|
302
|
+
sendRetainedArgumentsForEvent(eventName) {
|
|
303
|
+
const args = this.retainedEventArguments[eventName];
|
|
304
|
+
if (!args) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
delete this.retainedEventArguments[eventName];
|
|
308
|
+
args.forEach((arg) => {
|
|
309
|
+
this.notifyListeners(eventName, arg);
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
const encode = (str) => encodeURIComponent(str).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
314
|
+
const decode = (str) => str.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
315
|
+
class CapacitorCookiesPluginWeb extends WebPlugin {
|
|
316
|
+
async getCookies() {
|
|
317
|
+
const cookies = document.cookie;
|
|
318
|
+
const cookieMap = {};
|
|
319
|
+
cookies.split(";").forEach((cookie) => {
|
|
320
|
+
if (cookie.length <= 0)
|
|
321
|
+
return;
|
|
322
|
+
let [key, value] = cookie.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
|
|
323
|
+
key = decode(key).trim();
|
|
324
|
+
value = decode(value).trim();
|
|
325
|
+
cookieMap[key] = value;
|
|
326
|
+
});
|
|
327
|
+
return cookieMap;
|
|
328
|
+
}
|
|
329
|
+
async setCookie(options) {
|
|
330
|
+
try {
|
|
331
|
+
const encodedKey = encode(options.key);
|
|
332
|
+
const encodedValue = encode(options.value);
|
|
333
|
+
const expires = `; expires=${(options.expires || "").replace("expires=", "")}`;
|
|
334
|
+
const path = (options.path || "/").replace("path=", "");
|
|
335
|
+
const domain = options.url != null && options.url.length > 0 ? `domain=${options.url}` : "";
|
|
336
|
+
document.cookie = `${encodedKey}=${encodedValue || ""}${expires}; path=${path}; ${domain};`;
|
|
337
|
+
} catch (error) {
|
|
338
|
+
return Promise.reject(error);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
async deleteCookie(options) {
|
|
342
|
+
try {
|
|
343
|
+
document.cookie = `${options.key}=; Max-Age=0`;
|
|
344
|
+
} catch (error) {
|
|
345
|
+
return Promise.reject(error);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
async clearCookies() {
|
|
349
|
+
try {
|
|
350
|
+
const cookies = document.cookie.split(";") || [];
|
|
351
|
+
for (const cookie of cookies) {
|
|
352
|
+
document.cookie = cookie.replace(/^ +/, "").replace(/=.*/, `=;expires=${(/* @__PURE__ */ new Date()).toUTCString()};path=/`);
|
|
353
|
+
}
|
|
354
|
+
} catch (error) {
|
|
355
|
+
return Promise.reject(error);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
async clearAllCookies() {
|
|
359
|
+
try {
|
|
360
|
+
await this.clearCookies();
|
|
361
|
+
} catch (error) {
|
|
362
|
+
return Promise.reject(error);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
registerPlugin("CapacitorCookies", {
|
|
367
|
+
web: () => new CapacitorCookiesPluginWeb()
|
|
368
|
+
});
|
|
369
|
+
const readBlobAsBase64 = async (blob) => new Promise((resolve, reject) => {
|
|
370
|
+
const reader = new FileReader();
|
|
371
|
+
reader.onload = () => {
|
|
372
|
+
const base64String = reader.result;
|
|
373
|
+
resolve(base64String.indexOf(",") >= 0 ? base64String.split(",")[1] : base64String);
|
|
374
|
+
};
|
|
375
|
+
reader.onerror = (error) => reject(error);
|
|
376
|
+
reader.readAsDataURL(blob);
|
|
377
|
+
});
|
|
378
|
+
const normalizeHttpHeaders = (headers = {}) => {
|
|
379
|
+
const originalKeys = Object.keys(headers);
|
|
380
|
+
const loweredKeys = Object.keys(headers).map((k) => k.toLocaleLowerCase());
|
|
381
|
+
const normalized = loweredKeys.reduce((acc, key, index) => {
|
|
382
|
+
acc[key] = headers[originalKeys[index]];
|
|
383
|
+
return acc;
|
|
384
|
+
}, {});
|
|
385
|
+
return normalized;
|
|
386
|
+
};
|
|
387
|
+
const buildUrlParams = (params, shouldEncode = true) => {
|
|
388
|
+
if (!params)
|
|
389
|
+
return null;
|
|
390
|
+
const output = Object.entries(params).reduce((accumulator, entry) => {
|
|
391
|
+
const [key, value] = entry;
|
|
392
|
+
let encodedValue;
|
|
393
|
+
let item;
|
|
394
|
+
if (Array.isArray(value)) {
|
|
395
|
+
item = "";
|
|
396
|
+
value.forEach((str) => {
|
|
397
|
+
encodedValue = shouldEncode ? encodeURIComponent(str) : str;
|
|
398
|
+
item += `${key}=${encodedValue}&`;
|
|
399
|
+
});
|
|
400
|
+
item.slice(0, -1);
|
|
401
|
+
} else {
|
|
402
|
+
encodedValue = shouldEncode ? encodeURIComponent(value) : value;
|
|
403
|
+
item = `${key}=${encodedValue}`;
|
|
404
|
+
}
|
|
405
|
+
return `${accumulator}&${item}`;
|
|
406
|
+
}, "");
|
|
407
|
+
return output.substr(1);
|
|
408
|
+
};
|
|
409
|
+
const buildRequestInit = (options, extra = {}) => {
|
|
410
|
+
const output = Object.assign({ method: options.method || "GET", headers: options.headers }, extra);
|
|
411
|
+
const headers = normalizeHttpHeaders(options.headers);
|
|
412
|
+
const type = headers["content-type"] || "";
|
|
413
|
+
if (typeof options.data === "string") {
|
|
414
|
+
output.body = options.data;
|
|
415
|
+
} else if (type.includes("application/x-www-form-urlencoded")) {
|
|
416
|
+
const params = new URLSearchParams();
|
|
417
|
+
for (const [key, value] of Object.entries(options.data || {})) {
|
|
418
|
+
params.set(key, value);
|
|
419
|
+
}
|
|
420
|
+
output.body = params.toString();
|
|
421
|
+
} else if (type.includes("multipart/form-data") || options.data instanceof FormData) {
|
|
422
|
+
const form = new FormData();
|
|
423
|
+
if (options.data instanceof FormData) {
|
|
424
|
+
options.data.forEach((value, key) => {
|
|
425
|
+
form.append(key, value);
|
|
426
|
+
});
|
|
427
|
+
} else {
|
|
428
|
+
for (const key of Object.keys(options.data)) {
|
|
429
|
+
form.append(key, options.data[key]);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
output.body = form;
|
|
433
|
+
const headers2 = new Headers(output.headers);
|
|
434
|
+
headers2.delete("content-type");
|
|
435
|
+
output.headers = headers2;
|
|
436
|
+
} else if (type.includes("application/json") || typeof options.data === "object") {
|
|
437
|
+
output.body = JSON.stringify(options.data);
|
|
438
|
+
}
|
|
439
|
+
return output;
|
|
440
|
+
};
|
|
441
|
+
class CapacitorHttpPluginWeb extends WebPlugin {
|
|
442
|
+
/**
|
|
443
|
+
* Perform an Http request given a set of options
|
|
444
|
+
* @param options Options to build the HTTP request
|
|
445
|
+
*/
|
|
446
|
+
async request(options) {
|
|
447
|
+
const requestInit = buildRequestInit(options, options.webFetchExtra);
|
|
448
|
+
const urlParams = buildUrlParams(options.params, options.shouldEncodeUrlParams);
|
|
449
|
+
const url = urlParams ? `${options.url}?${urlParams}` : options.url;
|
|
450
|
+
const response = await fetch(url, requestInit);
|
|
451
|
+
const contentType = response.headers.get("content-type") || "";
|
|
452
|
+
let { responseType = "text" } = response.ok ? options : {};
|
|
453
|
+
if (contentType.includes("application/json")) {
|
|
454
|
+
responseType = "json";
|
|
455
|
+
}
|
|
456
|
+
let data;
|
|
457
|
+
let blob;
|
|
458
|
+
switch (responseType) {
|
|
459
|
+
case "arraybuffer":
|
|
460
|
+
case "blob":
|
|
461
|
+
blob = await response.blob();
|
|
462
|
+
data = await readBlobAsBase64(blob);
|
|
463
|
+
break;
|
|
464
|
+
case "json":
|
|
465
|
+
data = await response.json();
|
|
466
|
+
break;
|
|
467
|
+
case "document":
|
|
468
|
+
case "text":
|
|
469
|
+
default:
|
|
470
|
+
data = await response.text();
|
|
471
|
+
}
|
|
472
|
+
const headers = {};
|
|
473
|
+
response.headers.forEach((value, key) => {
|
|
474
|
+
headers[key] = value;
|
|
475
|
+
});
|
|
476
|
+
return {
|
|
477
|
+
data,
|
|
478
|
+
headers,
|
|
479
|
+
status: response.status,
|
|
480
|
+
url: response.url
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Perform an Http GET request given a set of options
|
|
485
|
+
* @param options Options to build the HTTP request
|
|
486
|
+
*/
|
|
487
|
+
async get(options) {
|
|
488
|
+
return this.request(Object.assign(Object.assign({}, options), { method: "GET" }));
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Perform an Http POST request given a set of options
|
|
492
|
+
* @param options Options to build the HTTP request
|
|
493
|
+
*/
|
|
494
|
+
async post(options) {
|
|
495
|
+
return this.request(Object.assign(Object.assign({}, options), { method: "POST" }));
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Perform an Http PUT request given a set of options
|
|
499
|
+
* @param options Options to build the HTTP request
|
|
500
|
+
*/
|
|
501
|
+
async put(options) {
|
|
502
|
+
return this.request(Object.assign(Object.assign({}, options), { method: "PUT" }));
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Perform an Http PATCH request given a set of options
|
|
506
|
+
* @param options Options to build the HTTP request
|
|
507
|
+
*/
|
|
508
|
+
async patch(options) {
|
|
509
|
+
return this.request(Object.assign(Object.assign({}, options), { method: "PATCH" }));
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Perform an Http DELETE request given a set of options
|
|
513
|
+
* @param options Options to build the HTTP request
|
|
514
|
+
*/
|
|
515
|
+
async delete(options) {
|
|
516
|
+
return this.request(Object.assign(Object.assign({}, options), { method: "DELETE" }));
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
registerPlugin("CapacitorHttp", {
|
|
520
|
+
web: () => new CapacitorHttpPluginWeb()
|
|
521
|
+
});
|
|
522
|
+
export {
|
|
523
|
+
Capacitor,
|
|
524
|
+
CapacitorException,
|
|
525
|
+
CapacitorPlatforms,
|
|
526
|
+
ExceptionCode,
|
|
527
|
+
WebPlugin,
|
|
528
|
+
buildRequestInit,
|
|
529
|
+
registerPlugin
|
|
530
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-CBsFp24u.js","./index-B4uDgADr.js","./preload-helper-tXtZnHb0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import { _ as __vitePreload } from "./preload-helper-tXtZnHb0.js";
|
|
3
|
+
import { registerPlugin } from "./index-B4uDgADr.js";
|
|
4
|
+
var Directory;
|
|
5
|
+
(function(Directory2) {
|
|
6
|
+
Directory2["Documents"] = "DOCUMENTS";
|
|
7
|
+
Directory2["Data"] = "DATA";
|
|
8
|
+
Directory2["Library"] = "LIBRARY";
|
|
9
|
+
Directory2["Cache"] = "CACHE";
|
|
10
|
+
Directory2["External"] = "EXTERNAL";
|
|
11
|
+
Directory2["ExternalStorage"] = "EXTERNAL_STORAGE";
|
|
12
|
+
})(Directory || (Directory = {}));
|
|
13
|
+
var Encoding;
|
|
14
|
+
(function(Encoding2) {
|
|
15
|
+
Encoding2["UTF8"] = "utf8";
|
|
16
|
+
Encoding2["ASCII"] = "ascii";
|
|
17
|
+
Encoding2["UTF16"] = "utf16";
|
|
18
|
+
})(Encoding || (Encoding = {}));
|
|
19
|
+
const FilesystemDirectory = Directory;
|
|
20
|
+
const FilesystemEncoding = Encoding;
|
|
21
|
+
const Filesystem = registerPlugin("Filesystem", {
|
|
22
|
+
web: () => __vitePreload(() => import("./web-CBsFp24u.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m) => new m.FilesystemWeb())
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
Directory,
|
|
26
|
+
Encoding,
|
|
27
|
+
Filesystem,
|
|
28
|
+
FilesystemDirectory,
|
|
29
|
+
FilesystemEncoding
|
|
30
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-TfDzToU7.js","./index-B4uDgADr.js","./preload-helper-tXtZnHb0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import { _ as __vitePreload } from "./preload-helper-tXtZnHb0.js";
|
|
3
|
+
import { registerPlugin } from "./index-B4uDgADr.js";
|
|
4
|
+
var ImpactStyle;
|
|
5
|
+
(function(ImpactStyle2) {
|
|
6
|
+
ImpactStyle2["Heavy"] = "HEAVY";
|
|
7
|
+
ImpactStyle2["Medium"] = "MEDIUM";
|
|
8
|
+
ImpactStyle2["Light"] = "LIGHT";
|
|
9
|
+
})(ImpactStyle || (ImpactStyle = {}));
|
|
10
|
+
var NotificationType;
|
|
11
|
+
(function(NotificationType2) {
|
|
12
|
+
NotificationType2["Success"] = "SUCCESS";
|
|
13
|
+
NotificationType2["Warning"] = "WARNING";
|
|
14
|
+
NotificationType2["Error"] = "ERROR";
|
|
15
|
+
})(NotificationType || (NotificationType = {}));
|
|
16
|
+
const HapticsNotificationType = NotificationType;
|
|
17
|
+
const HapticsImpactStyle = ImpactStyle;
|
|
18
|
+
const Haptics = registerPlugin("Haptics", {
|
|
19
|
+
web: () => __vitePreload(() => import("./web-TfDzToU7.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m) => new m.HapticsWeb())
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
Haptics,
|
|
23
|
+
HapticsImpactStyle,
|
|
24
|
+
HapticsNotificationType,
|
|
25
|
+
ImpactStyle,
|
|
26
|
+
NotificationType
|
|
27
|
+
};
|