@simplysm/capacitor-plugin-broadcast 13.0.0-beta.6 → 13.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.
package/README.md CHANGED
@@ -50,6 +50,23 @@ An interface representing Broadcast reception results or Intent information.
50
50
  | `action` | `string \| undefined` | Broadcast action string |
51
51
  | `extras` | `Record<string, unknown> \| undefined` | Additional data included in the Intent |
52
52
 
53
+ ### `IBroadcastPlugin` Interface
54
+
55
+ The low-level Capacitor plugin interface. In most cases, use the `Broadcast` wrapper class instead of this interface directly. It is exported for advanced use cases such as custom plugin registration.
56
+
57
+ | Method | Return Type | Description |
58
+ |--------|----------|------|
59
+ | `subscribe(options, callback)` | `Promise<{ id: string }>` | Register a BroadcastReceiver with intent filters |
60
+ | `unsubscribe(options)` | `Promise<void>` | Unregister a specific BroadcastReceiver by ID |
61
+ | `unsubscribeAll()` | `Promise<void>` | Unregister all BroadcastReceivers |
62
+ | `send(options)` | `Promise<void>` | Send a Broadcast Intent |
63
+ | `getLaunchIntent()` | `Promise<IBroadcastResult>` | Retrieve the launch Intent |
64
+ | `addListener("onNewIntent", callback)` | `Promise<PluginListenerHandle>` | Listen for new Intents while the app is running |
65
+
66
+ ```typescript
67
+ import type { IBroadcastPlugin, IBroadcastResult } from "@simplysm/capacitor-plugin-broadcast";
68
+ ```
69
+
53
70
  ## Usage Examples
54
71
 
55
72
  ### Receiving Broadcasts
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/Broadcast.ts"],
4
- "sourcesContent": ["import { registerPlugin } from \"@capacitor/core\";\nimport type { PluginListenerHandle } from \"@capacitor/core\";\nimport type { IBroadcastPlugin, IBroadcastResult } from \"./IBroadcastPlugin\";\n\nconst BroadcastPlugin = registerPlugin<IBroadcastPlugin>(\"Broadcast\", {\n web: async () => {\n const { BroadcastWeb } = await import(\"./web/BroadcastWeb\");\n return new BroadcastWeb();\n },\n});\n\n/**\n * Android Broadcast \uC1A1\uC218\uC2E0 \uD50C\uB7EC\uADF8\uC778\n * - \uC0B0\uC5C5\uC6A9 \uC7A5\uCE58(\uBC14\uCF54\uB4DC \uC2A4\uCE90\uB108, PDA \uB4F1) \uC5F0\uB3D9\uC6A9\n */\nexport abstract class Broadcast {\n /**\n * Broadcast \uC218\uC2E0 \uB4F1\uB85D\n * @returns \uD574\uC81C \uD568\uC218\n *\n * @example\n * ```ts\n * const unsub = await Broadcast.subscribe(\n * [\"com.symbol.datawedge.api.RESULT_ACTION\"],\n * (result) => console.log(result.extras)\n * );\n *\n * // \uD574\uC81C\n * unsub();\n * ```\n */\n static async subscribe(\n filters: string[],\n callback: (result: IBroadcastResult) => void,\n ): Promise<() => Promise<void>> {\n const { id } = await BroadcastPlugin.subscribe({ filters }, (result) => {\n // Filter out the initial resolve that only contains { id }\n if (result.action != null) {\n callback(result);\n }\n });\n return async () => {\n await BroadcastPlugin.unsubscribe({ id });\n };\n }\n\n /**\n * \uBAA8\uB4E0 Broadcast \uC218\uC2E0\uAE30 \uD574\uC81C\n */\n static async unsubscribeAll(): Promise<void> {\n await BroadcastPlugin.unsubscribeAll();\n }\n\n /**\n * Broadcast \uC804\uC1A1\n *\n * @example\n * ```ts\n * await Broadcast.send({\n * action: \"com.symbol.datawedge.api.ACTION\",\n * extras: {\n * \"com.symbol.datawedge.api.SOFT_SCAN_TRIGGER\": \"TOGGLE_SCANNING\"\n * }\n * });\n * ```\n */\n static async send(options: { action: string; extras?: Record<string, unknown> }): Promise<void> {\n await BroadcastPlugin.send(options);\n }\n\n /**\n * \uC571 \uC2DC\uC791 Intent \uAC00\uC838\uC624\uAE30\n */\n static async getLaunchIntent(): Promise<IBroadcastResult> {\n return BroadcastPlugin.getLaunchIntent();\n }\n\n /**\n * \uC571 \uC2E4\uD589 \uC911 \uC0C8 Intent \uC218\uC2E0 \uB9AC\uC2A4\uB108 \uB4F1\uB85D\n * @returns \uB9AC\uC2A4\uB108 \uD578\uB4E4 (remove()\uB85C \uD574\uC81C)\n */\n static async addNewIntentListener(callback: (result: IBroadcastResult) => void): Promise<PluginListenerHandle> {\n return BroadcastPlugin.addListener(\"onNewIntent\", callback);\n }\n}\n"],
5
4
  "mappings": "AAAA,SAAS,sBAAsB;AAI/B,MAAM,kBAAkB,eAAiC,aAAa;AAAA,EACpE,KAAK,YAAY;AACf,UAAM,EAAE,aAAa,IAAI,MAAM,OAAO,oBAAoB;AAC1D,WAAO,IAAI,aAAa;AAAA,EAC1B;AACF,CAAC;AAMM,MAAe,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgB9B,aAAa,UACX,SACA,UAC8B;AAC9B,UAAM,EAAE,GAAG,IAAI,MAAM,gBAAgB,UAAU,EAAE,QAAQ,GAAG,CAAC,WAAW;AAEtE,UAAI,OAAO,UAAU,MAAM;AACzB,iBAAS,MAAM;AAAA,MACjB;AAAA,IACF,CAAC;AACD,WAAO,YAAY;AACjB,YAAM,gBAAgB,YAAY,EAAE,GAAG,CAAC;AAAA,IAC1C;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,aAAa,iBAAgC;AAC3C,UAAM,gBAAgB,eAAe;AAAA,EACvC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeA,aAAa,KAAK,SAA8E;AAC9F,UAAM,gBAAgB,KAAK,OAAO;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA,EAKA,aAAa,kBAA6C;AACxD,WAAO,gBAAgB,gBAAgB;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,aAAa,qBAAqB,UAA6E;AAC7G,WAAO,gBAAgB,YAAY,eAAe,QAAQ;AAAA,EAC5D;AACF;",
6
5
  "names": []
7
6
  }
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": [],
4
- "sourcesContent": [],
5
4
  "mappings": "",
6
5
  "names": []
7
6
  }
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./Broadcast";
2
- export * from "./IBroadcastPlugin";
1
+ export * from "./Broadcast.js";
2
+ export * from "./IBroadcastPlugin.js";
3
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["export * from \"./Broadcast\";\nexport * from \"./IBroadcastPlugin\";\n"],
5
4
  "mappings": "AAAA,cAAc;AACd,cAAc;",
6
5
  "names": []
7
6
  }
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/web/BroadcastWeb.ts"],
4
- "sourcesContent": ["import { WebPlugin } from \"@capacitor/core\";\nimport type { IBroadcastPlugin, IBroadcastResult } from \"../IBroadcastPlugin\";\n\nexport class BroadcastWeb extends WebPlugin implements IBroadcastPlugin {\n private static readonly _warn = () =>\n // eslint-disable-next-line no-console\n console.warn(\"[Broadcast] \uC6F9 \uD658\uACBD\uC5D0\uC11C\uB294 Broadcast\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\");\n\n subscribe(_options: { filters: string[] }, _callback: (result: IBroadcastResult) => void): Promise<{ id: string }> {\n BroadcastWeb._warn();\n return Promise.resolve({ id: \"web-stub\" });\n }\n\n async unsubscribe(_options: { id: string }): Promise<void> {\n // \uC6F9 \uD658\uACBD\uC5D0\uC11C\uB294 no-op\n }\n\n async unsubscribeAll(): Promise<void> {\n // \uC6F9 \uD658\uACBD\uC5D0\uC11C\uB294 no-op\n }\n\n send(_options: { action: string; extras?: Record<string, unknown> }): Promise<void> {\n BroadcastWeb._warn();\n return Promise.resolve();\n }\n\n getLaunchIntent(): Promise<IBroadcastResult> {\n return Promise.resolve({});\n }\n}\n"],
5
4
  "mappings": "AAAA,SAAS,iBAAiB;AAGnB,MAAM,qBAAqB,UAAsC;AAAA,EACtE,OAAwB,QAAQ;AAAA;AAAA,IAE9B,QAAQ,KAAK,sHAA2C;AAAA;AAAA,EAE1D,UAAU,UAAiC,WAAwE;AACjH,iBAAa,MAAM;AACnB,WAAO,QAAQ,QAAQ,EAAE,IAAI,WAAW,CAAC;AAAA,EAC3C;AAAA,EAEA,MAAM,YAAY,UAAyC;AAAA,EAE3D;AAAA,EAEA,MAAM,iBAAgC;AAAA,EAEtC;AAAA,EAEA,KAAK,UAA+E;AAClF,iBAAa,MAAM;AACnB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,kBAA6C;AAC3C,WAAO,QAAQ,QAAQ,CAAC,CAAC;AAAA,EAC3B;AACF;",
6
5
  "names": []
7
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/capacitor-plugin-broadcast",
3
- "version": "13.0.0-beta.6",
3
+ "version": "13.0.1",
4
4
  "description": "심플리즘 패키지 - Capacitor Broadcast Plugin",
5
5
  "author": "김석래",
6
6
  "repository": {
@@ -12,6 +12,10 @@
12
12
  "type": "module",
13
13
  "main": "./dist/index.js",
14
14
  "types": "./dist/index.d.ts",
15
+ "files": [
16
+ "dist",
17
+ "android"
18
+ ],
15
19
  "capacitor": {
16
20
  "android": {
17
21
  "src": "android"
@@ -21,6 +25,6 @@
21
25
  "@capacitor/core": "^7.4.4"
22
26
  },
23
27
  "devDependencies": {
24
- "@capacitor/core": "^7.4.4"
28
+ "@capacitor/core": "^7.4.5"
25
29
  }
26
- }
30
+ }
@@ -1 +0,0 @@
1
- {"fileNames":["../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.webworker.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/types/jsx.d.ts","../../../node_modules/.pnpm/@capacitor+core@7.4.5/node_modules/@capacitor/core/types/definitions-internal.d.ts","../../../node_modules/.pnpm/@capacitor+core@7.4.5/node_modules/@capacitor/core/types/util.d.ts","../../../node_modules/.pnpm/@capacitor+core@7.4.5/node_modules/@capacitor/core/types/definitions.d.ts","../../../node_modules/.pnpm/@capacitor+core@7.4.5/node_modules/@capacitor/core/types/global.d.ts","../../../node_modules/.pnpm/@capacitor+core@7.4.5/node_modules/@capacitor/core/types/web-plugin.d.ts","../../../node_modules/.pnpm/@capacitor+core@7.4.5/node_modules/@capacitor/core/types/core-plugins.d.ts","../../../node_modules/.pnpm/@capacitor+core@7.4.5/node_modules/@capacitor/core/types/index.d.ts","../src/IBroadcastPlugin.ts","../src/web/BroadcastWeb.ts","../src/Broadcast.ts","../src/index.ts"],"fileIdsList":[[86,88],[86],[85],[85,86,87,88,89],[84],[85,86],[82],[83,90,91,92],[83,90],[83,91,93],[83,90,91]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","signature":false,"impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","signature":false,"impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","signature":false,"impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","signature":false,"impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","signature":false,"impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","signature":false,"impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","signature":false,"impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","signature":false,"impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","signature":false,"impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","signature":false,"impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","signature":false,"impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"8ea22b76493fc658fe9b76a84e64c9618823608076ecee5ed3f93f7f0dde904e","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","signature":false,"affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","signature":false,"impliedFormat":1},{"version":"5ad3e58181b335ff8794bcc3161a1506dbe8cebbce71a15b3dc7bfe56f076679","signature":false,"impliedFormat":99},{"version":"676166750527a2d0f685cd72a325f57cee8324e3a87c2466492d057332be2609","signature":false,"impliedFormat":1},{"version":"faf9680c348be133d1deebf9b65f0d527013f12bd52cfc1dfa91cf140a105c79","signature":false,"impliedFormat":1},{"version":"c1bf515bb8571ae22aed9f95484eda20dafe3e976a18e75fc202e109ddb90c79","signature":false,"impliedFormat":1},{"version":"0504724a0b391f837adbd89cbf451647b9c317c9f4eb1dff6144356b2e2580fb","signature":false,"impliedFormat":1},{"version":"9a08820b03bed0396aca9c00023ccfb5bd58493ba790a21419ce5ca47ed75d70","signature":false,"impliedFormat":1},{"version":"b19cc33ba9acf99826ae93551507755b4348ea59041a0b7a7c034f78624fad39","signature":false,"impliedFormat":1},{"version":"2092e5163496bee3920cf37f898ae05e2a70ec66c269662079ca733dc6711555","signature":false,"impliedFormat":1},{"version":"90e146aba5e8f2c9b23fede334fa88ce682e05d76f167cae87e652bdb491805e","signature":false},{"version":"bd1e186274b5a91af740cfeef587818d6f3aff711c7b47e6cec54ca839a64385","signature":false},{"version":"ca9242f576f773f8978936abc838289ed75399460eb053d740cf885297c27565","signature":false},{"version":"e437afe4c5f32c92019cff0ff516d972fa0a0a2f46939d718b01cc2a282900a7","signature":false}],"root":[[91,94]],"options":{"declaration":false,"declarationMap":false,"emitDeclarationOnly":false,"esModuleInterop":true,"importHelpers":true,"jsx":1,"jsxImportSource":"solid-js","module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noPropertyAccessFromIndexSignature":true,"skipLibCheck":true,"sourceMap":false,"strict":true,"target":99,"tsBuildInfoFile":"./typecheck-browser.tsbuildinfo","useDefineForClassFields":true,"useUnknownInCatchVariables":true,"verbatimModuleSyntax":true},"referencedMap":[[89,1],[84,2],[86,3],[87,2],[90,4],[85,5],[88,6],[83,7],[93,8],[91,9],[94,10],[92,11]],"changeFileSet":[89,84,86,87,90,85,88,82,83,80,81,13,14,17,16,2,18,19,20,21,22,23,24,25,3,26,27,4,28,32,29,30,31,33,34,35,5,36,37,38,39,6,43,40,41,42,44,7,45,50,51,46,47,48,49,8,55,52,53,54,56,9,57,58,59,61,60,62,63,10,64,65,66,11,67,68,69,70,71,1,72,73,12,77,75,79,74,78,76,15,93,91,94,92],"version":"5.8.3"}
package/src/Broadcast.ts DELETED
@@ -1,85 +0,0 @@
1
- import { registerPlugin } from "@capacitor/core";
2
- import type { PluginListenerHandle } from "@capacitor/core";
3
- import type { IBroadcastPlugin, IBroadcastResult } from "./IBroadcastPlugin";
4
-
5
- const BroadcastPlugin = registerPlugin<IBroadcastPlugin>("Broadcast", {
6
- web: async () => {
7
- const { BroadcastWeb } = await import("./web/BroadcastWeb");
8
- return new BroadcastWeb();
9
- },
10
- });
11
-
12
- /**
13
- * Android Broadcast 송수신 플러그인
14
- * - 산업용 장치(바코드 스캐너, PDA 등) 연동용
15
- */
16
- export abstract class Broadcast {
17
- /**
18
- * Broadcast 수신 등록
19
- * @returns 해제 함수
20
- *
21
- * @example
22
- * ```ts
23
- * const unsub = await Broadcast.subscribe(
24
- * ["com.symbol.datawedge.api.RESULT_ACTION"],
25
- * (result) => console.log(result.extras)
26
- * );
27
- *
28
- * // 해제
29
- * unsub();
30
- * ```
31
- */
32
- static async subscribe(
33
- filters: string[],
34
- callback: (result: IBroadcastResult) => void,
35
- ): Promise<() => Promise<void>> {
36
- const { id } = await BroadcastPlugin.subscribe({ filters }, (result) => {
37
- // Filter out the initial resolve that only contains { id }
38
- if (result.action != null) {
39
- callback(result);
40
- }
41
- });
42
- return async () => {
43
- await BroadcastPlugin.unsubscribe({ id });
44
- };
45
- }
46
-
47
- /**
48
- * 모든 Broadcast 수신기 해제
49
- */
50
- static async unsubscribeAll(): Promise<void> {
51
- await BroadcastPlugin.unsubscribeAll();
52
- }
53
-
54
- /**
55
- * Broadcast 전송
56
- *
57
- * @example
58
- * ```ts
59
- * await Broadcast.send({
60
- * action: "com.symbol.datawedge.api.ACTION",
61
- * extras: {
62
- * "com.symbol.datawedge.api.SOFT_SCAN_TRIGGER": "TOGGLE_SCANNING"
63
- * }
64
- * });
65
- * ```
66
- */
67
- static async send(options: { action: string; extras?: Record<string, unknown> }): Promise<void> {
68
- await BroadcastPlugin.send(options);
69
- }
70
-
71
- /**
72
- * 앱 시작 Intent 가져오기
73
- */
74
- static async getLaunchIntent(): Promise<IBroadcastResult> {
75
- return BroadcastPlugin.getLaunchIntent();
76
- }
77
-
78
- /**
79
- * 앱 실행 중 새 Intent 수신 리스너 등록
80
- * @returns 리스너 핸들 (remove()로 해제)
81
- */
82
- static async addNewIntentListener(callback: (result: IBroadcastResult) => void): Promise<PluginListenerHandle> {
83
- return BroadcastPlugin.addListener("onNewIntent", callback);
84
- }
85
- }
@@ -1,40 +0,0 @@
1
- import type { PluginListenerHandle } from "@capacitor/core";
2
-
3
- export interface IBroadcastResult {
4
- /** Broadcast action */
5
- action?: string;
6
- /** Extra data */
7
- extras?: Record<string, unknown>;
8
- }
9
-
10
- export interface IBroadcastPlugin {
11
- /**
12
- * Broadcast 수신기 등록
13
- */
14
- subscribe(options: { filters: string[] }, callback: (result: IBroadcastResult) => void): Promise<{ id: string }>;
15
-
16
- /**
17
- * 특정 Broadcast 수신기 해제
18
- */
19
- unsubscribe(options: { id: string }): Promise<void>;
20
-
21
- /**
22
- * 모든 Broadcast 수신기 해제
23
- */
24
- unsubscribeAll(): Promise<void>;
25
-
26
- /**
27
- * Broadcast 전송
28
- */
29
- send(options: { action: string; extras?: Record<string, unknown> }): Promise<void>;
30
-
31
- /**
32
- * 앱 시작 Intent 가져오기
33
- */
34
- getLaunchIntent(): Promise<IBroadcastResult>;
35
-
36
- /**
37
- * 앱 실행 중 새 Intent 수신 리스너 등록
38
- */
39
- addListener(eventName: "onNewIntent", listenerFunc: (data: IBroadcastResult) => void): Promise<PluginListenerHandle>;
40
- }
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./Broadcast";
2
- export * from "./IBroadcastPlugin";
@@ -1,30 +0,0 @@
1
- import { WebPlugin } from "@capacitor/core";
2
- import type { IBroadcastPlugin, IBroadcastResult } from "../IBroadcastPlugin";
3
-
4
- export class BroadcastWeb extends WebPlugin implements IBroadcastPlugin {
5
- private static readonly _warn = () =>
6
- // eslint-disable-next-line no-console
7
- console.warn("[Broadcast] 웹 환경에서는 Broadcast를 지원하지 않습니다.");
8
-
9
- subscribe(_options: { filters: string[] }, _callback: (result: IBroadcastResult) => void): Promise<{ id: string }> {
10
- BroadcastWeb._warn();
11
- return Promise.resolve({ id: "web-stub" });
12
- }
13
-
14
- async unsubscribe(_options: { id: string }): Promise<void> {
15
- // 웹 환경에서는 no-op
16
- }
17
-
18
- async unsubscribeAll(): Promise<void> {
19
- // 웹 환경에서는 no-op
20
- }
21
-
22
- send(_options: { action: string; extras?: Record<string, unknown> }): Promise<void> {
23
- BroadcastWeb._warn();
24
- return Promise.resolve();
25
- }
26
-
27
- getLaunchIntent(): Promise<IBroadcastResult> {
28
- return Promise.resolve({});
29
- }
30
- }