@hyperscript-tools/multilingual 2.3.1 → 2.5.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/LICENSE +20 -0
- package/README.md +118 -0
- package/dist/hyperscript-i18n-ar.global.js +4 -0
- package/dist/hyperscript-i18n-bn.global.js +4 -0
- package/dist/hyperscript-i18n-de.global.js +4 -0
- package/dist/hyperscript-i18n-east-asian.global.js +4 -0
- package/dist/hyperscript-i18n-en.global.js +6 -0
- package/dist/hyperscript-i18n-es.global.js +4 -0
- package/dist/hyperscript-i18n-fr.global.js +4 -0
- package/dist/hyperscript-i18n-he.global.js +4 -0
- package/dist/hyperscript-i18n-hi.global.js +4 -0
- package/dist/hyperscript-i18n-id.global.js +4 -0
- package/dist/hyperscript-i18n-it.global.js +4 -0
- package/dist/hyperscript-i18n-ja.global.js +4 -0
- package/dist/hyperscript-i18n-ko.global.js +4 -0
- package/dist/hyperscript-i18n-lite.global.js +1 -0
- package/dist/hyperscript-i18n-ms.global.js +4 -0
- package/dist/hyperscript-i18n-pl.global.js +4 -0
- package/dist/hyperscript-i18n-pt.global.js +4 -0
- package/dist/hyperscript-i18n-qu.global.js +4 -0
- package/dist/hyperscript-i18n-ru.global.js +4 -0
- package/dist/hyperscript-i18n-slavic.global.js +4 -0
- package/dist/hyperscript-i18n-south-asian.global.js +4 -0
- package/dist/hyperscript-i18n-southeast-asian.global.js +4 -0
- package/dist/hyperscript-i18n-sw.global.js +4 -0
- package/dist/hyperscript-i18n-th.global.js +4 -0
- package/dist/hyperscript-i18n-tl.global.js +4 -0
- package/dist/hyperscript-i18n-tr.global.js +4 -0
- package/dist/hyperscript-i18n-uk.global.js +4 -0
- package/dist/hyperscript-i18n-vi.global.js +4 -0
- package/dist/hyperscript-i18n-western.global.js +4 -0
- package/dist/hyperscript-i18n-zh.global.js +4 -0
- package/dist/hyperscript-i18n.global.js +63 -0
- package/package.json +101 -4
- package/scripts/copy-bundles.mjs +25 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperscript-tools/multilingual",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Write original _hyperscript in 24 languages — Japanese, Korean, Spanish, Arabic, Chinese, Turkish, and more",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,10 +9,104 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./browser": {
|
|
14
|
+
"default": "./dist/hyperscript-i18n.global.js"
|
|
15
|
+
},
|
|
16
|
+
"./browser/lite": {
|
|
17
|
+
"default": "./dist/hyperscript-i18n-lite.global.js"
|
|
18
|
+
},
|
|
19
|
+
"./browser/ar": {
|
|
20
|
+
"default": "./dist/hyperscript-i18n-ar.global.js"
|
|
21
|
+
},
|
|
22
|
+
"./browser/bn": {
|
|
23
|
+
"default": "./dist/hyperscript-i18n-bn.global.js"
|
|
24
|
+
},
|
|
25
|
+
"./browser/de": {
|
|
26
|
+
"default": "./dist/hyperscript-i18n-de.global.js"
|
|
27
|
+
},
|
|
28
|
+
"./browser/en": {
|
|
29
|
+
"default": "./dist/hyperscript-i18n-en.global.js"
|
|
30
|
+
},
|
|
31
|
+
"./browser/es": {
|
|
32
|
+
"default": "./dist/hyperscript-i18n-es.global.js"
|
|
33
|
+
},
|
|
34
|
+
"./browser/fr": {
|
|
35
|
+
"default": "./dist/hyperscript-i18n-fr.global.js"
|
|
36
|
+
},
|
|
37
|
+
"./browser/he": {
|
|
38
|
+
"default": "./dist/hyperscript-i18n-he.global.js"
|
|
39
|
+
},
|
|
40
|
+
"./browser/hi": {
|
|
41
|
+
"default": "./dist/hyperscript-i18n-hi.global.js"
|
|
42
|
+
},
|
|
43
|
+
"./browser/id": {
|
|
44
|
+
"default": "./dist/hyperscript-i18n-id.global.js"
|
|
45
|
+
},
|
|
46
|
+
"./browser/it": {
|
|
47
|
+
"default": "./dist/hyperscript-i18n-it.global.js"
|
|
48
|
+
},
|
|
49
|
+
"./browser/ja": {
|
|
50
|
+
"default": "./dist/hyperscript-i18n-ja.global.js"
|
|
51
|
+
},
|
|
52
|
+
"./browser/ko": {
|
|
53
|
+
"default": "./dist/hyperscript-i18n-ko.global.js"
|
|
54
|
+
},
|
|
55
|
+
"./browser/ms": {
|
|
56
|
+
"default": "./dist/hyperscript-i18n-ms.global.js"
|
|
57
|
+
},
|
|
58
|
+
"./browser/pl": {
|
|
59
|
+
"default": "./dist/hyperscript-i18n-pl.global.js"
|
|
60
|
+
},
|
|
61
|
+
"./browser/pt": {
|
|
62
|
+
"default": "./dist/hyperscript-i18n-pt.global.js"
|
|
63
|
+
},
|
|
64
|
+
"./browser/qu": {
|
|
65
|
+
"default": "./dist/hyperscript-i18n-qu.global.js"
|
|
66
|
+
},
|
|
67
|
+
"./browser/ru": {
|
|
68
|
+
"default": "./dist/hyperscript-i18n-ru.global.js"
|
|
69
|
+
},
|
|
70
|
+
"./browser/sw": {
|
|
71
|
+
"default": "./dist/hyperscript-i18n-sw.global.js"
|
|
72
|
+
},
|
|
73
|
+
"./browser/th": {
|
|
74
|
+
"default": "./dist/hyperscript-i18n-th.global.js"
|
|
75
|
+
},
|
|
76
|
+
"./browser/tl": {
|
|
77
|
+
"default": "./dist/hyperscript-i18n-tl.global.js"
|
|
78
|
+
},
|
|
79
|
+
"./browser/tr": {
|
|
80
|
+
"default": "./dist/hyperscript-i18n-tr.global.js"
|
|
81
|
+
},
|
|
82
|
+
"./browser/uk": {
|
|
83
|
+
"default": "./dist/hyperscript-i18n-uk.global.js"
|
|
84
|
+
},
|
|
85
|
+
"./browser/vi": {
|
|
86
|
+
"default": "./dist/hyperscript-i18n-vi.global.js"
|
|
87
|
+
},
|
|
88
|
+
"./browser/zh": {
|
|
89
|
+
"default": "./dist/hyperscript-i18n-zh.global.js"
|
|
90
|
+
},
|
|
91
|
+
"./browser/western": {
|
|
92
|
+
"default": "./dist/hyperscript-i18n-western.global.js"
|
|
93
|
+
},
|
|
94
|
+
"./browser/east-asian": {
|
|
95
|
+
"default": "./dist/hyperscript-i18n-east-asian.global.js"
|
|
96
|
+
},
|
|
97
|
+
"./browser/south-asian": {
|
|
98
|
+
"default": "./dist/hyperscript-i18n-south-asian.global.js"
|
|
99
|
+
},
|
|
100
|
+
"./browser/southeast-asian": {
|
|
101
|
+
"default": "./dist/hyperscript-i18n-southeast-asian.global.js"
|
|
102
|
+
},
|
|
103
|
+
"./browser/slavic": {
|
|
104
|
+
"default": "./dist/hyperscript-i18n-slavic.global.js"
|
|
12
105
|
}
|
|
13
106
|
},
|
|
14
107
|
"scripts": {
|
|
15
|
-
"build": "tsup src/index.ts --format esm --dts",
|
|
108
|
+
"build": "tsup src/index.ts --format esm --dts && node scripts/copy-bundles.mjs",
|
|
109
|
+
"build:bundles": "node scripts/copy-bundles.mjs",
|
|
16
110
|
"typecheck": "tsc --noEmit"
|
|
17
111
|
},
|
|
18
112
|
"keywords": [
|
|
@@ -30,7 +124,7 @@
|
|
|
30
124
|
"author": "HyperFixi Contributors",
|
|
31
125
|
"license": "MIT",
|
|
32
126
|
"dependencies": {
|
|
33
|
-
"@lokascript/hyperscript-adapter": "
|
|
127
|
+
"@lokascript/hyperscript-adapter": "^2.5.0"
|
|
34
128
|
},
|
|
35
129
|
"devDependencies": {
|
|
36
130
|
"@types/node": "^20.0.0",
|
|
@@ -38,7 +132,10 @@
|
|
|
38
132
|
"typescript": "^5.0.0"
|
|
39
133
|
},
|
|
40
134
|
"files": [
|
|
41
|
-
"dist"
|
|
135
|
+
"dist",
|
|
136
|
+
"scripts",
|
|
137
|
+
"README.md",
|
|
138
|
+
"LICENSE"
|
|
42
139
|
],
|
|
43
140
|
"publishConfig": {
|
|
44
141
|
"access": "public"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { copyFileSync, mkdirSync, readdirSync, statSync } from 'node:fs';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const sourceDir = join(here, '..', '..', 'hyperscript-adapter', 'dist');
|
|
8
|
+
const targetDir = join(here, '..', 'dist');
|
|
9
|
+
|
|
10
|
+
mkdirSync(targetDir, { recursive: true });
|
|
11
|
+
|
|
12
|
+
const entries = readdirSync(sourceDir).filter(name => name.endsWith('.global.js'));
|
|
13
|
+
if (entries.length === 0) {
|
|
14
|
+
console.error(`No .global.js bundles found in ${sourceDir}. Did the adapter build run?`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let bytes = 0;
|
|
19
|
+
for (const name of entries) {
|
|
20
|
+
const from = join(sourceDir, name);
|
|
21
|
+
const to = join(targetDir, name);
|
|
22
|
+
copyFileSync(from, to);
|
|
23
|
+
bytes += statSync(to).size;
|
|
24
|
+
}
|
|
25
|
+
console.log(`Copied ${entries.length} bundles (${(bytes / 1024).toFixed(0)} KB total) into ${targetDir}`);
|