multi_embed_player 3.1.1 → 3.2.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/add_exports.js ADDED
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ const dtsPath = path.join(__dirname, 'dist', 'multi_embed_player.d.ts');
7
+
8
+ if (fs.existsSync(dtsPath)) {
9
+ let content = fs.readFileSync(dtsPath, 'utf8');
10
+
11
+ // 既にexport文が存在するかチェック
12
+ if (!content.includes('// ES Modules support')) {
13
+ // export文を追加
14
+ const exportStatement = `
15
+ // ES Modules support
16
+ export {
17
+ multi_embed_player,
18
+ ServiceType,
19
+ PlaylistItem,
20
+ mep_playitem,
21
+ mep_parallel,
22
+ mep_parallel_inner,
23
+ multi_embed_player_fetch_iframe_api,
24
+ multi_embed_player_save_GDPR_status,
25
+ multi_embed_player_GDPR_reviever,
26
+ multi_embed_player_GDPR_accepted_all_back_down,
27
+ multi_embed_player_css
28
+ };
29
+ export as namespace MultiEmbedPlayer;`;
30
+
31
+ // ソースマップの行の前に挿入
32
+ content = content.replace('//# sourceMappingURL=', exportStatement + '\n//# sourceMappingURL=');
33
+
34
+ fs.writeFileSync(dtsPath, content);
35
+ console.log('✓ Export文を multi_embed_player.d.ts に追加しました');
36
+ } else {
37
+ console.log('✓ Export文は既に存在します');
38
+ }
39
+ } else {
40
+ console.error('✗ multi_embed_player.d.ts が見つかりません');
41
+ process.exit(1);
42
+ }
@@ -212,4 +212,20 @@ declare class mep_parallel_inner {
212
212
  declare const multi_embed_player_save_GDPR_status: () => void;
213
213
  declare const multi_embed_player_GDPR_reviever: (service: ServiceType) => void;
214
214
  declare const multi_embed_player_css: HTMLStyleElement;
215
+
216
+ // ES Modules support
217
+ export {
218
+ multi_embed_player,
219
+ ServiceType,
220
+ PlaylistItem,
221
+ mep_playitem,
222
+ mep_parallel,
223
+ mep_parallel_inner,
224
+ multi_embed_player_fetch_iframe_api,
225
+ multi_embed_player_save_GDPR_status,
226
+ multi_embed_player_GDPR_reviever,
227
+ multi_embed_player_GDPR_accepted_all_back_down,
228
+ multi_embed_player_css
229
+ };
230
+ export as namespace MultiEmbedPlayer;
215
231
  //# sourceMappingURL=multi_embed_player.d.ts.map
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name":"multi_embed_player",
3
3
  "main":"./dist/multi_embed_player.js",
4
+ "module": "./dist/multi_embed_player.js",
4
5
  "types":"./dist/multi_embed_player.d.ts",
5
- "version": "3.1.1",
6
+ "version": "3.2.0",
6
7
  "license": "Apache-2.0",
7
8
  "style":"./multi_embed_player.css",
8
9
  "description": "some video site embed and control playing",
@@ -13,8 +14,14 @@
13
14
  "bugs": {
14
15
  "url": "https://github.com/bonjinnorenka/multi_embed_player/issues"
15
16
  },
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/multi_embed_player.d.ts",
20
+ "default": "./dist/multi_embed_player.js"
21
+ }
22
+ },
16
23
  "scripts": {
17
- "build": "tsc",
24
+ "build": "tsc && node add_exports.js",
18
25
  "dev": "tsc --watch",
19
26
  "lint": "tsc --noEmit",
20
27
  "lint:fix": "tsc --noEmit"