ds-one 0.1.11-alpha.7 → 0.1.11-alpha.9
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/DS1/0-face/2025-04-23-device.ts +117 -1
- package/DS1/1-root/one.css +1 -1
- package/DS1/index.ts +6 -0
- package/DS1/utils/cdn-loader.ts +5 -0
- package/DS1/utils/keys.json +41 -1
- package/README.md +1 -1
- package/dist/0-face/2025-04-23-device.d.ts +24 -0
- package/dist/0-face/2025-04-23-device.d.ts.map +1 -1
- package/dist/0-face/2025-04-23-device.js +84 -1
- package/dist/ds-one.bundle.js +113 -1
- package/dist/ds-one.bundle.js.map +3 -3
- package/dist/ds-one.bundle.min.js +32 -32
- package/dist/ds-one.bundle.min.js.map +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/utils/cdn-loader.d.ts.map +1 -1
- package/dist/utils/cdn-loader.js +5 -0
- package/dist/utils/keys.json +41 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "./0-face/2025-04-23-device";
|
|
1
2
|
import "./utils/cdn-loader";
|
|
2
3
|
export * from "./2-core/ds-button";
|
|
3
4
|
export * from "./2-core/ds-text";
|
|
@@ -30,4 +31,5 @@ export * from "./utils/viewMode";
|
|
|
30
31
|
export * from "./utils/settings";
|
|
31
32
|
export * from "./utils/pricing";
|
|
32
33
|
export * from "./utils/scroll";
|
|
34
|
+
export * from "./0-face/2025-04-23-device";
|
|
33
35
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../DS1/index.ts"],"names":[],"mappings":"AAIA,OAAO,oBAAoB,CAAC;AAG5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB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,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// DS one - Main entry point for all components
|
|
2
2
|
// Export all components for easy importing
|
|
3
|
+
// Initialize device detection (will auto-detect and log on load)
|
|
4
|
+
import "./0-face/2025-04-23-device";
|
|
3
5
|
// Initialize CDN loader (will auto-load external translations if available)
|
|
4
6
|
import "./utils/cdn-loader";
|
|
5
7
|
// Core components
|
|
@@ -37,3 +39,5 @@ export * from "./utils/viewMode";
|
|
|
37
39
|
export * from "./utils/settings";
|
|
38
40
|
export * from "./utils/pricing";
|
|
39
41
|
export * from "./utils/scroll";
|
|
42
|
+
// Device detection
|
|
43
|
+
export * from "./0-face/2025-04-23-device";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdn-loader.d.ts","sourceRoot":"","sources":["../../DS1/utils/cdn-loader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9C,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAEtD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,mBAAmB,CAAC,EAAE,cAAc,CAAC;QACrC,wBAAwB,CAAC,EAAE,MAAM,CAAC;KACnC;CACF;
|
|
1
|
+
{"version":3,"file":"cdn-loader.d.ts","sourceRoot":"","sources":["../../DS1/utils/cdn-loader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9C,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAEtD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,mBAAmB,CAAC,EAAE,cAAc,CAAC;QACrC,wBAAwB,CAAC,EAAE,MAAM,CAAC;KACnC;CACF;AA2JD;;GAEG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC,CA8CjE"}
|
package/dist/utils/cdn-loader.js
CHANGED
|
@@ -82,11 +82,14 @@ function validateTranslationMap(candidate) {
|
|
|
82
82
|
}
|
|
83
83
|
async function fetchTranslationFile(source) {
|
|
84
84
|
try {
|
|
85
|
+
console.log(`[DS one] Attempting to fetch translations from: ${source}`);
|
|
85
86
|
const response = await fetch(source);
|
|
86
87
|
if (!response.ok) {
|
|
88
|
+
console.log(`[DS one] Failed to fetch ${source} (${response.status})`);
|
|
87
89
|
return null;
|
|
88
90
|
}
|
|
89
91
|
const translations = await response.json();
|
|
92
|
+
console.log(`[DS one] Successfully fetched JSON from ${source}`);
|
|
90
93
|
if (!validateTranslationMap(translations)) {
|
|
91
94
|
console.warn(`[DS one] Invalid translation format in ${source}. Expected object with language codes as keys.`);
|
|
92
95
|
return null;
|
|
@@ -96,11 +99,13 @@ async function fetchTranslationFile(source) {
|
|
|
96
99
|
console.warn(`[DS one] No languages found in ${source}`);
|
|
97
100
|
return null;
|
|
98
101
|
}
|
|
102
|
+
console.log(`[DS one] Valid translations found: ${languages.join(", ")}`);
|
|
99
103
|
return translations;
|
|
100
104
|
}
|
|
101
105
|
catch (error) {
|
|
102
106
|
if (error instanceof TypeError &&
|
|
103
107
|
error.message.includes("Failed to fetch")) {
|
|
108
|
+
console.log(`[DS one] Network error fetching ${source}`);
|
|
104
109
|
return null;
|
|
105
110
|
}
|
|
106
111
|
console.error(`[DS one] Error loading external translations from ${source}:`, error);
|
package/dist/utils/keys.json
CHANGED
|
@@ -1 +1,41 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"en": {
|
|
3
|
+
"language": "Language",
|
|
4
|
+
"theme": "Theme",
|
|
5
|
+
"home": "Home",
|
|
6
|
+
"about": "About",
|
|
7
|
+
"contact": "Contact",
|
|
8
|
+
"welcome": "Welcome",
|
|
9
|
+
"description": "Description",
|
|
10
|
+
"learnMore": "Learn More",
|
|
11
|
+
"copyright": "© 2025",
|
|
12
|
+
"siteTitle": "Site Title",
|
|
13
|
+
"downloadCV": "Download CV"
|
|
14
|
+
},
|
|
15
|
+
"da": {
|
|
16
|
+
"language": "Sprog",
|
|
17
|
+
"theme": "Tema",
|
|
18
|
+
"home": "Hjem",
|
|
19
|
+
"about": "Om",
|
|
20
|
+
"contact": "Kontakt",
|
|
21
|
+
"welcome": "Velkommen",
|
|
22
|
+
"description": "Beskrivelse",
|
|
23
|
+
"learnMore": "Lær Mere",
|
|
24
|
+
"copyright": "© 2025",
|
|
25
|
+
"siteTitle": "Site Titel",
|
|
26
|
+
"downloadCV": "Download CV"
|
|
27
|
+
},
|
|
28
|
+
"ja": {
|
|
29
|
+
"language": "言語",
|
|
30
|
+
"theme": "テーマ",
|
|
31
|
+
"home": "ホーム",
|
|
32
|
+
"about": "について",
|
|
33
|
+
"contact": "お問い合わせ",
|
|
34
|
+
"welcome": "ようこそ",
|
|
35
|
+
"description": "説明",
|
|
36
|
+
"learnMore": "詳細を見る",
|
|
37
|
+
"copyright": "© 2025",
|
|
38
|
+
"siteTitle": "サイトタイトル",
|
|
39
|
+
"downloadCV": "CVをダウンロード"
|
|
40
|
+
}
|
|
41
|
+
}
|