capacitor-sora-editor 0.0.1

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,38 @@
1
+ package com.github.soraeditor.capacitor.ui.theme
2
+
3
+ import androidx.compose.foundation.isSystemInDarkTheme
4
+ import androidx.compose.material3.*
5
+ import androidx.compose.runtime.Composable
6
+ import androidx.compose.ui.graphics.Color
7
+
8
+ private val DarkColorScheme = darkColorScheme(
9
+ primary = Color(0xFFFFFFFF),
10
+ onPrimary = Color(0xFF000000),
11
+ background = Color(0xFF000000),
12
+ surface = Color(0xFF121212),
13
+ onSurface = Color(0xFFFFFFFF),
14
+ surfaceVariant = Color(0xFF222222)
15
+ )
16
+
17
+ private val LightColorScheme = lightColorScheme(
18
+ primary = Color(0xFF757575), // Gray
19
+ onPrimary = Color(0xFFFFFFFF),
20
+ background = Color(0xFFFFFFFF),
21
+ surface = Color(0xFFF5F5F5),
22
+ onSurface = Color(0xFF000000),
23
+ surfaceVariant = Color(0xFFE0E0E0), // Light Gray
24
+ secondary = Color(0xFF9E9E9E)
25
+ )
26
+
27
+ @Composable
28
+ fun NotesTheme(
29
+ darkTheme: Boolean = isSystemInDarkTheme(),
30
+ content: @Composable () -> Unit
31
+ ) {
32
+ val colorScheme = if (darkTheme) DarkColorScheme else LightColorScheme
33
+
34
+ MaterialTheme(
35
+ colorScheme = colorScheme,
36
+ content = content
37
+ )
38
+ }
@@ -0,0 +1,6 @@
1
+ <resources>
2
+ <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
3
+ <item name="windowActionBar">false</item>
4
+ <item name="windowNoTitle">true</item>
5
+ </style>
6
+ </resources>
@@ -0,0 +1,5 @@
1
+ export interface SoraEditorPlugin {
2
+ openEditor(options: {
3
+ filePath: string;
4
+ }): Promise<void>;
5
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { SoraEditorPlugin } from './definitions';
2
+ declare const SoraEditor: SoraEditorPlugin;
3
+ export * from './definitions';
4
+ export { SoraEditor };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const SoraEditor = registerPlugin('SoraEditor', {
3
+ web: () => import('./web').then(m => new m.SoraEditorWeb()),
4
+ });
5
+ export * from './definitions';
6
+ export { SoraEditor };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,UAAU,GAAG,cAAc,CAAmB,YAAY,EAAE;IAC9D,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { SoraEditorPlugin } from './definitions';
3
+ export declare class SoraEditorWeb extends WebPlugin implements SoraEditorPlugin {
4
+ openEditor(options: {
5
+ filePath: string;
6
+ }): Promise<void>;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ export class SoraEditorWeb extends WebPlugin {
3
+ async openEditor(options) {
4
+ console.log('openEditor', options);
5
+ console.warn('SoraEditor is implemented for Android only');
6
+ }
7
+ }
8
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IACxC,KAAK,CAAC,UAAU,CAAC,OAA6B;QAC1C,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;IAC/D,CAAC;CACJ"}
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var core = require('@capacitor/core');
6
+
7
+ const SoraEditor = core.registerPlugin('SoraEditor', {
8
+ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.SoraEditorWeb()),
9
+ });
10
+
11
+ class SoraEditorWeb extends core.WebPlugin {
12
+ async openEditor(options) {
13
+ console.log('openEditor', options);
14
+ console.warn('SoraEditor is implemented for Android only');
15
+ }
16
+ }
17
+
18
+ var web = /*#__PURE__*/Object.freeze({
19
+ __proto__: null,
20
+ SoraEditorWeb: SoraEditorWeb
21
+ });
22
+
23
+ exports.SoraEditor = SoraEditor;
24
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst SoraEditor = registerPlugin('SoraEditor', {\n web: () => import('./web').then(m => new m.SoraEditorWeb()),\n});\nexport * from './definitions';\nexport { SoraEditor };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SoraEditorWeb extends WebPlugin {\n async openEditor(options) {\n console.log('openEditor', options);\n console.warn('SoraEditor is implemented for Android only');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AAC/D,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;AAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAC3C,QAAQ,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;AACnE,KAAK;AACL;;;;;;;;;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,27 @@
1
+ var capacitorSoraEditor = (function (exports, core) {
2
+ 'use strict';
3
+
4
+ const SoraEditor = core.registerPlugin('SoraEditor', {
5
+ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.SoraEditorWeb()),
6
+ });
7
+
8
+ class SoraEditorWeb extends core.WebPlugin {
9
+ async openEditor(options) {
10
+ console.log('openEditor', options);
11
+ console.warn('SoraEditor is implemented for Android only');
12
+ }
13
+ }
14
+
15
+ var web = /*#__PURE__*/Object.freeze({
16
+ __proto__: null,
17
+ SoraEditorWeb: SoraEditorWeb
18
+ });
19
+
20
+ exports.SoraEditor = SoraEditor;
21
+
22
+ Object.defineProperty(exports, '__esModule', { value: true });
23
+
24
+ return exports;
25
+
26
+ })({}, capacitorExports);
27
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst SoraEditor = registerPlugin('SoraEditor', {\n web: () => import('./web').then(m => new m.SoraEditorWeb()),\n});\nexport * from './definitions';\nexport { SoraEditor };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SoraEditorWeb extends WebPlugin {\n async openEditor(options) {\n console.log('openEditor', options);\n console.warn('SoraEditor is implemented for Android only');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IAC/D,CAAC;;ICFM,MAAM,aAAa,SAASC,cAAS,CAAC;IAC7C,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3C,QAAQ,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;IACnE,KAAK;IACL;;;;;;;;;;;;;;;;;"}
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "capacitor-sora-editor",
3
+ "version": "0.0.1",
4
+ "description": "Capacitor plugin for Sora Editor",
5
+ "main": "dist/plugin.cjs.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/esm/index.d.ts",
8
+ "unpkg": "dist/plugin.js",
9
+ "files": [
10
+ "dist/",
11
+ "ios/",
12
+ "android/",
13
+ "CapacitorSoraEditor.podspec"
14
+ ],
15
+ "author": "",
16
+ "license": "MIT",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/abc15018045126/notes.git"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/abc15018045126/notes/issues"
23
+ },
24
+ "keywords": [
25
+ "capacitor",
26
+ "plugin",
27
+ "native"
28
+ ],
29
+ "scripts": {
30
+ "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
31
+ "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
32
+ "verify:android": "cd android && ./gradlew clean build test && cd ..",
33
+ "verify:web": "npm run build",
34
+ "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
35
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
36
+ "eslint": "eslint . --ext ts",
37
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
38
+ "swiftlint": "node-swiftlint",
39
+ "docgen": "docgen --api SoraEditorPlugin --output-readme README.md --output-json dist/docs.json",
40
+ "build": "npm run clean && tsc && rollup -c rollup.config.js",
41
+ "clean": "rimraf dist",
42
+ "prepublishOnly": "npm run build"
43
+ },
44
+ "devDependencies": {
45
+ "@capacitor/android": "^6.0.0",
46
+ "@capacitor/core": "^6.0.0",
47
+ "@capacitor/docgen": "^0.2.1",
48
+ "@capacitor/ios": "^6.0.0",
49
+ "@ionic/eslint-config": "^0.3.0",
50
+ "@ionic/prettier-config": "^2.0.0",
51
+ "@ionic/swiftlint-config": "^1.1.2",
52
+ "eslint": "^7.11.0",
53
+ "prettier": "^2.4.0",
54
+ "prettier-plugin-java": "~1.0.2",
55
+ "rimraf": "^3.0.2",
56
+ "rollup": "^2.32.0",
57
+ "swiftlint": "^1.0.1",
58
+ "typescript": "^5.9.3"
59
+ },
60
+ "peerDependencies": {
61
+ "@capacitor/core": "^6.0.0"
62
+ },
63
+ "prettier": "@ionic/prettier-config",
64
+ "swiftlint": "@ionic/swiftlint-config",
65
+ "eslintConfig": {
66
+ "extends": "@ionic/eslint-config/recommended"
67
+ },
68
+ "capacitor": {
69
+ "android": {
70
+ "src": "android"
71
+ },
72
+ "ios": {
73
+ "src": "ios"
74
+ }
75
+ }
76
+ }