ds-one 0.2.5-alpha.1 → 0.2.5-alpha.10

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.
Files changed (67) hide show
  1. package/DS1/0-face/device.ts +10 -6
  2. package/DS1/0-face/i18n.ts +39 -90
  3. package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
  4. package/DS1/1-root/one.css +76 -107
  5. package/DS1/2-core/ds-banner.ts +3 -0
  6. package/DS1/2-core/ds-button.ts +12 -15
  7. package/DS1/2-core/ds-cycle.ts +67 -21
  8. package/DS1/2-core/ds-date.ts +1 -2
  9. package/DS1/2-core/ds-icon.ts +4 -4
  10. package/DS1/2-core/ds-text.ts +27 -3
  11. package/DS1/2-core/ds-tooltip.ts +6 -12
  12. package/DS1/3-unit/ds-list.ts +7 -0
  13. package/DS1/3-unit/ds-row.ts +4 -5
  14. package/DS1/3-unit/ds-table.ts +5 -6
  15. package/DS1/4-page/ds-grid.ts +9 -59
  16. package/DS1/4-page/ds-layout.ts +123 -18
  17. package/LICENSE +1 -1
  18. package/README.md +43 -133
  19. package/dist/0-face/device.d.ts.map +1 -1
  20. package/dist/0-face/device.js +7 -3
  21. package/dist/0-face/i18n.d.ts +0 -2
  22. package/dist/0-face/i18n.d.ts.map +1 -1
  23. package/dist/0-face/i18n.js +37 -74
  24. package/dist/2-core/ds-banner.d.ts +1 -0
  25. package/dist/2-core/ds-banner.d.ts.map +1 -0
  26. package/dist/2-core/ds-banner.js +2 -0
  27. package/dist/2-core/ds-button.d.ts +2 -7
  28. package/dist/2-core/ds-button.d.ts.map +1 -1
  29. package/dist/2-core/ds-button.js +11 -13
  30. package/dist/2-core/ds-cycle.d.ts +2 -0
  31. package/dist/2-core/ds-cycle.d.ts.map +1 -1
  32. package/dist/2-core/ds-cycle.js +65 -19
  33. package/dist/2-core/ds-date.js +1 -1
  34. package/dist/2-core/ds-icon.js +4 -4
  35. package/dist/2-core/ds-text.d.ts +2 -0
  36. package/dist/2-core/ds-text.d.ts.map +1 -1
  37. package/dist/2-core/ds-text.js +26 -3
  38. package/dist/2-core/ds-tooltip.d.ts +1 -1
  39. package/dist/2-core/ds-tooltip.d.ts.map +1 -1
  40. package/dist/2-core/ds-tooltip.js +6 -12
  41. package/dist/3-unit/ds-list.d.ts.map +1 -1
  42. package/dist/3-unit/ds-list.js +3 -0
  43. package/dist/3-unit/ds-portfolio-panel.d.ts.map +1 -1
  44. package/dist/3-unit/ds-portfolio-singlenav.js +3 -3
  45. package/dist/3-unit/ds-row.js +4 -4
  46. package/dist/3-unit/ds-table.d.ts.map +1 -1
  47. package/dist/3-unit/ds-table.js +5 -6
  48. package/dist/4-page/ds-grid.d.ts +0 -7
  49. package/dist/4-page/ds-grid.d.ts.map +1 -1
  50. package/dist/4-page/ds-grid.js +9 -54
  51. package/dist/4-page/ds-layout.d.ts +1 -1
  52. package/dist/4-page/ds-layout.d.ts.map +1 -1
  53. package/dist/4-page/ds-layout.js +126 -17
  54. package/dist/ds-one.bundle.js +347 -265
  55. package/dist/ds-one.bundle.js.map +4 -4
  56. package/dist/ds-one.bundle.min.js +204 -80
  57. package/dist/ds-one.bundle.min.js.map +4 -4
  58. package/package.json +7 -8
  59. package/DS1/3-unit/doublenav-v1.ts +0 -105
  60. package/DS1/3-unit/ds-portfolio-doublenav.ts +0 -105
  61. package/DS1/3-unit/ds-portfolio-panel.ts +0 -27
  62. package/DS1/3-unit/ds-portfolio-singlenav.ts +0 -79
  63. package/DS1/3-unit/list-v1.ts +0 -24
  64. package/DS1/3-unit/panel-v1.ts +0 -26
  65. package/DS1/3-unit/row-v1.ts +0 -52
  66. package/DS1/3-unit/singlenav-v1.ts +0 -78
  67. /package/DS1/x-icon/{row..svg → row.svg} +0 -0
@@ -38,11 +38,13 @@ function initDeviceDetection() {
38
38
  const designWidth = 280;
39
39
  const actualWidth = deviceInfo.screenWidth;
40
40
  const scalingFactor = actualWidth / designWidth;
41
- document.documentElement.style.setProperty("--scaling-factor-mobile", scalingFactor.toFixed(3));
41
+ document.documentElement.style.setProperty("--sf", scalingFactor.toFixed(3));
42
+ document.documentElement.style.setProperty("--sf", scalingFactor.toFixed(3));
42
43
  console.log(`[DS one] Mobile device detected - ${deviceInfo.deviceType} (${deviceInfo.screenWidth}x${deviceInfo.screenHeight}), scaling factor: ${scalingFactor.toFixed(2)}`);
43
44
  } else {
44
45
  if (typeof document !== "undefined") {
45
- document.documentElement.style.setProperty("--scaling-factor-mobile", "1");
46
+ document.documentElement.style.setProperty("--sf", "1");
47
+ document.documentElement.style.setProperty("--sf", "1");
46
48
  }
47
49
  console.log(`[DS one] Desktop device detected (${deviceInfo.screenWidth}x${deviceInfo.screenHeight})`);
48
50
  }
@@ -80,41 +82,41 @@ if (typeof window !== "undefined") {
80
82
  var translationKeys = {};
81
83
  var LANGUAGE_PRIORITY_ORDER = [
82
84
  "da",
83
- "nb",
84
- "sv",
85
- "pt",
85
+ "de",
86
+ "en",
86
87
  "es",
87
- "zh",
88
- "ko",
88
+ "fr",
89
+ "it",
89
90
  "ja",
90
- "en",
91
- "de"
91
+ "pt",
92
+ "sv",
93
+ "zh"
92
94
  ];
93
95
  var LANGUAGE_PRIORITY_LOOKUP = new Map(LANGUAGE_PRIORITY_ORDER.map((code, index) => [code, index]));
94
96
  var FALLBACK_LANGUAGE_NAMES = {
95
97
  da: "Danish",
96
98
  "da-dk": "Danish",
97
- nb: "Norwegian",
98
- "nb-no": "Norwegian",
99
- sv: "Swedish",
100
- "sv-se": "Swedish",
101
99
  de: "German",
102
100
  "de-de": "German",
103
101
  en: "English",
104
102
  "en-us": "English",
105
- pt: "Portuguese",
106
- "pt-pt": "Portuguese",
107
- "pt-br": "Portuguese (Brazil)",
108
103
  es: "Spanish",
109
104
  "es-es": "Spanish",
110
- "es-mx": "Spanish (Mexico)",
111
- zh: "Chinese",
112
- "zh-hans": "Chinese (Simplified)",
113
- "zh-hant": "Chinese (Traditional)",
105
+ fr: "French",
106
+ "fr-fr": "French",
107
+ it: "Italian",
108
+ "it-it": "Italian",
114
109
  ja: "Japanese",
115
110
  "ja-jp": "Japanese",
116
- ko: "Korean",
117
- "ko-kr": "Korean"
111
+ pt: "Portuguese",
112
+ "pt-pt": "Portuguese",
113
+ sv: "Swedish",
114
+ "sv-se": "Swedish",
115
+ zh: "Chinese",
116
+ "zh-cn": "Chinese",
117
+ "zh-tw": "Chinese",
118
+ "zh-hans": "Chinese",
119
+ "zh-hant": "Chinese"
118
120
  };
119
121
  var DISPLAY_NAME_CACHE = /* @__PURE__ */ new Map();
120
122
  var displayNameFallbackWarningShown = false;
@@ -230,7 +232,6 @@ function getTranslationData() {
230
232
  return translationKeys;
231
233
  }
232
234
  var translationData = getTranslationData();
233
- var notionStore = /* @__PURE__ */ new Map();
234
235
  var defaultLanguage = "en";
235
236
  function extractPrimarySubtag(code) {
236
237
  if (!code) {
@@ -334,33 +335,30 @@ function getLanguageDisplayName(code, options = {}) {
334
335
  var BROWSER_LANGUAGE_PREFERENCES = {
335
336
  da: "da",
336
337
  "da-dk": "da",
337
- no: "nb",
338
- nb: "nb",
339
- "nb-no": "nb",
340
- nn: "nn",
341
- "nn-no": "nn",
342
- sv: "sv",
343
- "sv-se": "sv",
344
- pt: "pt",
345
- "pt-pt": "pt",
346
- "pt-br": "pt",
338
+ de: "de",
339
+ "de-de": "de",
340
+ en: "en",
341
+ "en-us": "en",
342
+ "en-gb": "en",
347
343
  es: "es",
348
344
  "es-es": "es",
349
345
  "es-mx": "es",
346
+ fr: "fr",
347
+ "fr-fr": "fr",
348
+ it: "it",
349
+ "it-it": "it",
350
+ ja: "ja",
351
+ "ja-jp": "ja",
352
+ pt: "pt",
353
+ "pt-pt": "pt",
354
+ "pt-br": "pt",
355
+ sv: "sv",
356
+ "sv-se": "sv",
350
357
  zh: "zh",
351
358
  "zh-cn": "zh",
352
359
  "zh-hans": "zh",
353
360
  "zh-tw": "zh",
354
- "zh-hant": "zh",
355
- ko: "ko",
356
- "ko-kr": "ko",
357
- ja: "ja",
358
- "ja-jp": "ja",
359
- en: "en",
360
- "en-us": "en",
361
- "en-gb": "en",
362
- de: "de",
363
- "de-de": "de"
361
+ "zh-hant": "zh"
364
362
  };
365
363
  function resolvePreferredLanguage(languageTag) {
366
364
  if (!languageTag) {
@@ -425,7 +423,6 @@ if (typeof window !== "undefined") {
425
423
  window.addEventListener("translations-ready", () => {
426
424
  translationData = getTranslationData();
427
425
  window.dispatchEvent(new CustomEvent("translations-loaded"));
428
- window.notionDataLoaded = true;
429
426
  const currentLang = currentLanguage.value;
430
427
  window.dispatchEvent(new CustomEvent("language-changed", {
431
428
  detail: { language: currentLang },
@@ -436,7 +433,6 @@ if (typeof window !== "undefined") {
436
433
  }
437
434
  setTimeout(() => {
438
435
  window.dispatchEvent(new CustomEvent("translations-loaded"));
439
- window.notionDataLoaded = true;
440
436
  const currentLang = currentLanguage.value;
441
437
  window.dispatchEvent(new CustomEvent("language-changed", {
442
438
  detail: { language: currentLang },
@@ -452,7 +448,7 @@ function translate(key) {
452
448
  if (lang !== defaultLanguage && translationData?.[defaultLanguage]?.[key]) {
453
449
  return translationData[defaultLanguage][key];
454
450
  }
455
- console.warn(`[translate] No translation found for key "${key}"`);
451
+ console.warn(`[DS one (Internationalization)] No translation found for key "${key}"`);
456
452
  return key;
457
453
  }
458
454
  function hasTranslation(key, language = currentLanguage.value) {
@@ -471,34 +467,6 @@ function hasTranslation(key, language = currentLanguage.value) {
471
467
  function getText(key) {
472
468
  return translate(key);
473
469
  }
474
- async function getNotionText(key, language = currentLanguage.value) {
475
- if (!key) {
476
- return null;
477
- }
478
- if (!translationData || !translationData[language]) {
479
- return null;
480
- }
481
- const text = translationData[language][key];
482
- if (text) {
483
- return text;
484
- }
485
- if (language !== defaultLanguage && translationData[defaultLanguage]?.[key]) {
486
- return translationData[defaultLanguage][key];
487
- }
488
- return null;
489
- }
490
- function setNotionText(key, value, language = currentLanguage.value) {
491
- if (!key)
492
- return;
493
- const bucket = getLanguageBucket(language);
494
- bucket.set(key, value);
495
- }
496
- function getLanguageBucket(language) {
497
- if (!notionStore.has(language)) {
498
- notionStore.set(language, /* @__PURE__ */ new Map());
499
- }
500
- return notionStore.get(language);
501
- }
502
470
  function getAvailableLanguages() {
503
471
  const currentData = getTranslationData();
504
472
  if (currentData && Object.keys(currentData).length > 0) {
@@ -1851,14 +1819,13 @@ var Button = class extends i6 {
1851
1819
  this.bold = false;
1852
1820
  this["no-background"] = false;
1853
1821
  this.blank = false;
1854
- this.notionKey = null;
1855
1822
  this.key = "";
1856
1823
  this.fallback = "";
1857
1824
  this.language = "en-US";
1858
1825
  this.defaultText = "";
1859
1826
  this.href = "";
1860
1827
  this._loading = false;
1861
- this._notionText = null;
1828
+ this._text = null;
1862
1829
  }
1863
1830
  connectedCallback() {
1864
1831
  super.connectedCallback();
@@ -1880,9 +1847,9 @@ var Button = class extends i6 {
1880
1847
  */
1881
1848
  _updateText() {
1882
1849
  if (this.key) {
1883
- this._notionText = getText(this.key);
1850
+ this._text = getText(this.key);
1884
1851
  } else {
1885
- this._notionText = this.defaultText || this.fallback || null;
1852
+ this._text = this.defaultText || this.fallback || null;
1886
1853
  }
1887
1854
  this.requestUpdate();
1888
1855
  }
@@ -1895,7 +1862,7 @@ var Button = class extends i6 {
1895
1862
  ?no-background=${this["no-background"]}
1896
1863
  @click=${this._handleClick}
1897
1864
  >
1898
- ${this._notionText ? this._notionText : x`<slot></slot>`}
1865
+ ${this._text ? this._text : x`<slot></slot>`}
1899
1866
  </button>
1900
1867
  `;
1901
1868
  }
@@ -1927,24 +1894,23 @@ Button.properties = {
1927
1894
  attribute: "no-background"
1928
1895
  },
1929
1896
  blank: { type: Boolean, reflect: true },
1930
- notionKey: { type: String, attribute: "notion-key" },
1931
1897
  key: { type: String },
1932
1898
  fallback: { type: String },
1933
1899
  language: { type: String },
1934
1900
  defaultText: { type: String, attribute: "default-text" },
1935
1901
  href: { type: String },
1936
1902
  _loading: { type: Boolean, state: true },
1937
- _notionText: { type: String, state: true }
1903
+ _text: { type: String, state: true }
1938
1904
  };
1939
1905
  Button.styles = i4`
1940
1906
  button {
1941
- max-height: calc(var(--08) * var(--scaling-factor));
1907
+ max-height: calc(var(--08) * var(--sf));
1942
1908
  border: none;
1943
1909
  cursor: pointer;
1944
- font-size: calc(var(--type-size-default) * var(--scaling-factor));
1945
- padding: 0 calc(1px * var(--scaling-factor));
1910
+ font-size: calc(var(--type-size-default) * var(--sf));
1911
+ padding: 0 calc(1px * var(--sf));
1946
1912
  color: var(--button-text-color);
1947
- font-family: var(--typeface);
1913
+ font-family: var(--typeface-regular);
1948
1914
  }
1949
1915
 
1950
1916
  button.title {
@@ -1956,13 +1922,13 @@ Button.styles = i4`
1956
1922
  background-color: var(--accent-color);
1957
1923
  color: var(--button-text-color);
1958
1924
  text-decoration-line: none;
1959
- font-family: var(--typeface);
1925
+ font-family: var(--typeface-regular);
1960
1926
  }
1961
1927
 
1962
1928
  button.secondary {
1963
1929
  background-color: var(--button-background-color-secondary);
1964
1930
  color: var(--button-text-color);
1965
- font-family: var(--typeface);
1931
+ font-family: var(--typeface-regular);
1966
1932
  }
1967
1933
 
1968
1934
  button[bold] {
@@ -2247,8 +2213,8 @@ Icon.styles = i4`
2247
2213
  display: inline-flex;
2248
2214
  justify-content: center;
2249
2215
  align-items: center;
2250
- width: calc(16px * var(--scaling-factor));
2251
- height: calc(16px * var(--scaling-factor));
2216
+ width: calc(16px * var(--sf));
2217
+ height: calc(16px * var(--sf));
2252
2218
  }
2253
2219
 
2254
2220
  svg {
@@ -2265,8 +2231,8 @@ Icon.styles = i4`
2265
2231
  display: flex;
2266
2232
  justify-content: center;
2267
2233
  align-items: center;
2268
- width: calc(16px * var(--scaling-factor));
2269
- height: calc(16px * var(--scaling-factor));
2234
+ width: calc(16px * var(--sf));
2235
+ height: calc(16px * var(--sf));
2270
2236
  }
2271
2237
 
2272
2238
  /* Notes style color variable for future implementation */
@@ -2297,12 +2263,104 @@ Icon.iconNameToSvgMap = (() => {
2297
2263
  customElements.define("ds-icon", Icon);
2298
2264
  console.log("Icon component registered with custom elements registry");
2299
2265
 
2266
+ // dist/2-core/ds-text.js
2267
+ var Text = class extends i6 {
2268
+ static get properties() {
2269
+ return {
2270
+ key: { type: String, reflect: true },
2271
+ defaultValue: { type: String, reflect: true, attribute: "default-value" },
2272
+ fallback: { type: String, reflect: true },
2273
+ // Kept for backward compatibility
2274
+ _text: { type: String, state: true }
2275
+ };
2276
+ }
2277
+ constructor() {
2278
+ super();
2279
+ this.key = "";
2280
+ this.defaultValue = "";
2281
+ this.fallback = "";
2282
+ this._text = "";
2283
+ this._currentLanguage = currentLanguage.value;
2284
+ this.boundHandlers = {
2285
+ languageChanged: (() => {
2286
+ console.log("Language changed event received in ds-text");
2287
+ this._currentLanguage = currentLanguage.value;
2288
+ this._loadText();
2289
+ this.requestUpdate();
2290
+ })
2291
+ };
2292
+ }
2293
+ connectedCallback() {
2294
+ super.connectedCallback();
2295
+ this._currentLanguage = currentLanguage.value;
2296
+ this._updateLanguageAttribute();
2297
+ this._loadText();
2298
+ window.addEventListener("language-changed", this.boundHandlers.languageChanged);
2299
+ window.addEventListener("translations-loaded", this.boundHandlers.languageChanged);
2300
+ }
2301
+ disconnectedCallback() {
2302
+ super.disconnectedCallback();
2303
+ window.removeEventListener("language-changed", this.boundHandlers.languageChanged);
2304
+ window.removeEventListener("translations-loaded", this.boundHandlers.languageChanged);
2305
+ }
2306
+ updated(changedProperties) {
2307
+ super.updated(changedProperties);
2308
+ if (changedProperties.has("key") || changedProperties.has("defaultValue")) {
2309
+ this._loadText();
2310
+ }
2311
+ }
2312
+ _updateLanguageAttribute() {
2313
+ const lang = this._currentLanguage || currentLanguage.value;
2314
+ if (lang === "ja") {
2315
+ this.setAttribute("data-language", "ja");
2316
+ } else {
2317
+ this.removeAttribute("data-language");
2318
+ }
2319
+ }
2320
+ _loadText() {
2321
+ if (!this.key) {
2322
+ this._text = this.defaultValue || this.fallback || "";
2323
+ return;
2324
+ }
2325
+ try {
2326
+ const text = getText(this.key);
2327
+ this._text = text || this.defaultValue || this.fallback || this.key;
2328
+ } catch (error) {
2329
+ console.error("Error loading text for key:", this.key, error);
2330
+ this._text = this.defaultValue || this.fallback || this.key;
2331
+ }
2332
+ this._updateLanguageAttribute();
2333
+ this.requestUpdate();
2334
+ }
2335
+ render() {
2336
+ return x`<span>${this._text || this.defaultValue || this.key}</span>`;
2337
+ }
2338
+ };
2339
+ Text.styles = i4`
2340
+ :host {
2341
+ display: inline;
2342
+ font-family: var(--typeface-regular);
2343
+ font-size: calc(var(--type-size-default) * var(--sf));
2344
+ font-weight: var(--type-weight-default);
2345
+ line-height: calc(var(--type-lineheight-default) * var(--sf));
2346
+ letter-spacing: calc(var(--type-letterspacing-default) * var(--sf));
2347
+ text-align: var(--text-align-default);
2348
+ text-transform: var(--text-transform-default);
2349
+ text-decoration: var(--text-decoration-default);
2350
+ }
2351
+
2352
+ :host([data-language="ja"]) {
2353
+ font-family: var(--typeface-regular-jp);
2354
+ }
2355
+ `;
2356
+ customElements.define("ds-text", Text);
2357
+
2300
2358
  // dist/2-core/ds-cycle.js
2301
2359
  var saveAccentColor = (color) => {
2302
2360
  localStorage.setItem("accentColor", color);
2303
2361
  };
2304
2362
  var getAccentColor = () => {
2305
- return localStorage.getItem("accentColor") || "--blue";
2363
+ return localStorage.getItem("accentColor") || "--sharp-blue";
2306
2364
  };
2307
2365
  var applyAccentColor = () => {
2308
2366
  const color = getAccentColor();
@@ -2375,19 +2433,18 @@ var Cycle = class extends i6 {
2375
2433
  this.label = this.getLabel();
2376
2434
  } else if (this.type === "accent-color") {
2377
2435
  this.values = [
2378
- "--light-green",
2379
- "--green",
2380
- "--light-blue",
2381
- "--blue",
2436
+ "--apple-green",
2437
+ "--every-green",
2438
+ "--zenith-blue",
2439
+ "--sharp-blue",
2382
2440
  "--pink",
2383
- "--red",
2441
+ "--tuned-red",
2384
2442
  "--orange",
2385
2443
  "--yellow"
2386
2444
  ];
2387
2445
  const currentAccentColor = getAccentColor();
2388
2446
  this.currentValue = currentAccentColor;
2389
2447
  applyAccentColor();
2390
- this.label = this.getLabel();
2391
2448
  } else if (this.type === "notes-style-medium") {
2392
2449
  this.values = ["default", "big", "gallery"];
2393
2450
  const currentNotesStyle = getNotesStyleMedium();
@@ -2435,7 +2492,6 @@ var Cycle = class extends i6 {
2435
2492
  const currentAccentColor = getAccentColor();
2436
2493
  this.currentValue = currentAccentColor;
2437
2494
  applyAccentColor();
2438
- this.label = this.getLabel();
2439
2495
  } else if (this.type === "notes-style-medium") {
2440
2496
  const currentNotesStyle = getNotesStyleMedium();
2441
2497
  this.currentValue = currentNotesStyle;
@@ -2546,8 +2602,8 @@ var Cycle = class extends i6 {
2546
2602
  });
2547
2603
  } else if (this.type === "theme") {
2548
2604
  if (this.translationsReady) {
2549
- const translatedName = translate(`themes.${value}`);
2550
- if (translatedName && translatedName !== `themes.${value}`) {
2605
+ const translatedName = translate(value);
2606
+ if (translatedName && translatedName !== value) {
2551
2607
  return translatedName;
2552
2608
  }
2553
2609
  }
@@ -2574,15 +2630,28 @@ var Cycle = class extends i6 {
2574
2630
  }
2575
2631
  return value;
2576
2632
  }
2633
+ getColorKey(colorVar) {
2634
+ const colorMap = {
2635
+ "--tuned-red": "red",
2636
+ "--orange": "orange",
2637
+ "--yellow": "yellow",
2638
+ "--apple-green": "appleGreen",
2639
+ "--every-green": "green",
2640
+ "--zenith-blue": "lightBlue",
2641
+ "--sharp-blue": "blue",
2642
+ "--pink": "pink"
2643
+ };
2644
+ return colorMap[colorVar] || colorVar.replace("--", "").replace("-", " ");
2645
+ }
2577
2646
  getColorName(colorVar) {
2578
2647
  const colorMap = {
2579
- "--red": "red",
2648
+ "--tuned-red": "red",
2580
2649
  "--orange": "orange",
2581
2650
  "--yellow": "yellow",
2582
- "--light-green": "lightGreen",
2583
- "--green": "green",
2584
- "--light-blue": "lightBlue",
2585
- "--blue": "blue",
2651
+ "--apple-green": "appleGreen",
2652
+ "--every-green": "green",
2653
+ "--zenith-blue": "lightBlue",
2654
+ "--sharp-blue": "blue",
2586
2655
  "--pink": "pink"
2587
2656
  };
2588
2657
  const languageKey = colorMap[colorVar];
@@ -2657,7 +2726,19 @@ var Cycle = class extends i6 {
2657
2726
  render() {
2658
2727
  return x`
2659
2728
  <div class="cycle-container">
2660
- ${this.type !== "icon-only" ? x`<span class="cycle-label">${this.label}</span>` : ""}
2729
+ ${this.type !== "icon-only" ? x`${this.type === "language" ? x`<ds-text
2730
+ key="language"
2731
+ default-value="Language"
2732
+ class="cycle-label"
2733
+ ></ds-text>` : this.type === "theme" ? x`<ds-text
2734
+ key="theme"
2735
+ default-value="Theme"
2736
+ class="cycle-label"
2737
+ ></ds-text>` : this.type === "accent-color" ? x`<ds-text
2738
+ key="accentColor"
2739
+ default-value="Accent color"
2740
+ class="cycle-label"
2741
+ ></ds-text>` : x`<span class="cycle-label">${this.label}</span>`}` : ""}
2661
2742
  <div
2662
2743
  style="display: flex; align-items: center; ${this.type === "icon-only" ? "justify-content: center;" : ""}"
2663
2744
  >
@@ -2669,7 +2750,18 @@ var Cycle = class extends i6 {
2669
2750
  ${this.type === "notes-style-medium" || this.type === "icon-only" ? x`<span
2670
2751
  style="display: inline-flex; align-items: center; gap: var(--025)"
2671
2752
  >${this.getValueDisplay(this.currentValue)}</span
2672
- >` : x`<span>${this.getValueDisplay(this.currentValue)}</span>`}
2753
+ >` : this.type === "theme" ? x`<ds-text
2754
+ key=${this.currentValue}
2755
+ default-value=${this.currentValue}
2756
+ ></ds-text>` : this.type === "accent-color" ? x`<ds-text
2757
+ key=${this.getColorKey(this.currentValue)}
2758
+ default-value=${this.getColorName(this.currentValue)}
2759
+ ></ds-text>` : this.type === "page-style" ? x`<ds-text
2760
+ key=${this.currentValue}
2761
+ default-value=${this.currentValue}
2762
+ ></ds-text>` : x`<ds-text
2763
+ default-value=${this.getValueDisplay(this.currentValue)}
2764
+ ></ds-text>`}
2673
2765
  </ds-button>
2674
2766
  ${this.type === "accent-color" ? x`
2675
2767
  <div
@@ -2735,76 +2827,6 @@ Cycle.styles = i4`
2735
2827
  `;
2736
2828
  customElements.define("ds-cycle", Cycle);
2737
2829
 
2738
- // dist/2-core/ds-text.js
2739
- var Text = class extends i6 {
2740
- static get properties() {
2741
- return {
2742
- key: { type: String, reflect: true },
2743
- defaultValue: { type: String, reflect: true, attribute: "default-value" },
2744
- fallback: { type: String, reflect: true },
2745
- // Kept for backward compatibility
2746
- _text: { type: String, state: true }
2747
- };
2748
- }
2749
- constructor() {
2750
- super();
2751
- this.key = "";
2752
- this.defaultValue = "";
2753
- this.fallback = "";
2754
- this._text = "";
2755
- this.boundHandlers = {
2756
- languageChanged: (() => {
2757
- console.log("Language changed event received in ds-text");
2758
- this._loadText();
2759
- })
2760
- };
2761
- }
2762
- connectedCallback() {
2763
- super.connectedCallback();
2764
- this._loadText();
2765
- window.addEventListener("language-changed", this.boundHandlers.languageChanged);
2766
- window.addEventListener("translations-loaded", this.boundHandlers.languageChanged);
2767
- }
2768
- disconnectedCallback() {
2769
- super.disconnectedCallback();
2770
- window.removeEventListener("language-changed", this.boundHandlers.languageChanged);
2771
- window.removeEventListener("translations-loaded", this.boundHandlers.languageChanged);
2772
- }
2773
- updated(changedProperties) {
2774
- super.updated(changedProperties);
2775
- if (changedProperties.has("key") || changedProperties.has("defaultValue")) {
2776
- this._loadText();
2777
- }
2778
- }
2779
- _loadText() {
2780
- if (!this.key) {
2781
- this._text = this.defaultValue || this.fallback || "";
2782
- return;
2783
- }
2784
- try {
2785
- const text = getText(this.key);
2786
- this._text = text || this.defaultValue || this.fallback || this.key;
2787
- } catch (error) {
2788
- console.error("Error loading text for key:", this.key, error);
2789
- this._text = this.defaultValue || this.fallback || this.key;
2790
- }
2791
- this.requestUpdate();
2792
- }
2793
- render() {
2794
- return x`<span>${this._text || this.defaultValue || this.key}</span>`;
2795
- }
2796
- };
2797
- Text.styles = i4`
2798
- :host {
2799
- display: inline;
2800
- }
2801
-
2802
- .loading {
2803
- opacity: 0.6;
2804
- }
2805
- `;
2806
- customElements.define("ds-text", Text);
2807
-
2808
2830
  // dist/2-core/ds-tooltip.js
2809
2831
  var Tooltip = class extends i6 {
2810
2832
  constructor() {
@@ -2864,19 +2886,13 @@ var Tooltip = class extends i6 {
2864
2886
  this._loadText();
2865
2887
  }
2866
2888
  }
2867
- async _loadText() {
2889
+ _loadText() {
2868
2890
  if (!this.key) {
2869
2891
  this._text = this.defaultValue || "";
2870
2892
  this.requestUpdate();
2871
2893
  return;
2872
2894
  }
2873
2895
  try {
2874
- const notionText = await getNotionText(this.key);
2875
- if (notionText) {
2876
- this._text = notionText;
2877
- this.requestUpdate();
2878
- return;
2879
- }
2880
2896
  const t5 = translate(this.key);
2881
2897
  this._text = t5 && t5 !== this.key ? t5 : this.defaultValue || this.key;
2882
2898
  } catch (err) {
@@ -2917,10 +2933,10 @@ Tooltip.styles = i4`
2917
2933
  position: absolute;
2918
2934
  left: 50%;
2919
2935
  bottom: 100%;
2920
- transform: translate(-50%, calc(-2px * var(--scaling-factor)));
2936
+ transform: translate(-50%, calc(-2px * var(--sf)));
2921
2937
  z-index: 1000;
2922
2938
  pointer-events: none;
2923
- height: calc(var(--08) * var(--scaling-factor));
2939
+ height: calc(var(--08) * var(--sf));
2924
2940
  opacity: 0;
2925
2941
  transition:
2926
2942
  opacity 120ms ease,
@@ -2929,9 +2945,9 @@ Tooltip.styles = i4`
2929
2945
  color: light-dark(var(--white), var(--black));
2930
2946
  border-radius: 0;
2931
2947
  font-size: var(--type-size-default);
2932
- padding: 0px calc(1px * var(--scaling-factor));
2948
+ padding: 0px calc(1px * var(--sf));
2933
2949
  font-family: var(
2934
- --typeface,
2950
+ --typeface-regular,
2935
2951
  -apple-system,
2936
2952
  BlinkMacSystemFont,
2937
2953
  "Segoe UI",
@@ -2959,7 +2975,7 @@ var DateComponent = class extends i6 {
2959
2975
  DateComponent.styles = i4`
2960
2976
  :host {
2961
2977
  display: inline;
2962
- font-family: var(--typeface, var(--typeface-regular));
2978
+ font-family: var(--typeface-regular, var(--typeface-regular-regular));
2963
2979
  font-size: inherit;
2964
2980
  color: inherit;
2965
2981
  }
@@ -2999,18 +3015,18 @@ Row.styles = i4`
2999
3015
  :host {
3000
3016
  display: flex;
3001
3017
  align-items: end;
3002
- width: calc(240px * var(--scaling-factor));
3018
+ width: calc(240px * var(--sf));
3003
3019
  }
3004
3020
 
3005
3021
  :host([type="fill"]) {
3006
3022
  justify-content: space-between;
3007
- height: calc(var(--1) * var(--scaling-factor));
3023
+ height: calc(var(--1) * var(--sf));
3008
3024
  }
3009
3025
 
3010
3026
  :host([type="centered"]) {
3011
3027
  justify-content: center;
3012
- height: calc(var(--1) * var(--scaling-factor));
3013
- gap: calc(var(--025) * var(--scaling-factor));
3028
+ height: calc(var(--1) * var(--sf));
3029
+ gap: calc(var(--025) * var(--sf));
3014
3030
  }
3015
3031
  `;
3016
3032
  customElements.define("ds-row", Row);
@@ -3027,7 +3043,6 @@ var DsTable = class extends i6 {
3027
3043
  return x`
3028
3044
  <div class="table-container">
3029
3045
  <div class="table-header">
3030
-
3031
3046
  <div class="header-cell product-cell">Product</div>
3032
3047
  <div class="header-cell users-cell">Users</div>
3033
3048
  <div class="header-cell retention-cell">Retention</div>
@@ -3083,8 +3098,8 @@ DsTable.styles = i4`
3083
3098
  display: flex;
3084
3099
  align-items: center;
3085
3100
  justify-content: left;
3086
- padding: 0 2px;
3087
- font-family: var(--typeface);
3101
+ padding: 0 2px;
3102
+ font-family: var(--typeface-regular);
3088
3103
  font-size: var(--type-size-default);
3089
3104
  font-weight: var(--type-weight-default);
3090
3105
  line-height: var(--type-lineheight-default);
@@ -3098,10 +3113,10 @@ DsTable.styles = i4`
3098
3113
  display: flex;
3099
3114
  align-items: center;
3100
3115
  justify-content: left;
3101
-
3116
+
3102
3117
  outline: 1px solid var(--black);
3103
3118
 
3104
- font-family: var(--typeface);
3119
+ font-family: var(--typeface-regular);
3105
3120
  font-size: var(--type-size-default);
3106
3121
  font-weight: var(--type-weight-default);
3107
3122
  line-height: var(--type-lineheight-default);
@@ -3110,7 +3125,7 @@ DsTable.styles = i4`
3110
3125
  }
3111
3126
 
3112
3127
  .status-cell {
3113
- background-color: var(--light-green);
3128
+ background-color: var(--apple-green);
3114
3129
  }
3115
3130
 
3116
3131
  .product-cell {
@@ -3140,43 +3155,12 @@ customElements.define("ds-table", DsTable);
3140
3155
 
3141
3156
  // dist/4-page/ds-grid.js
3142
3157
  var Grid = class extends i6 {
3143
- constructor() {
3144
- super(...arguments);
3145
- this._isMobile = false;
3146
- }
3147
- connectedCallback() {
3148
- super.connectedCallback();
3149
- this._isMobile = detectMobileDevice();
3150
- console.log(`[ds-grid] Mobile device: ${this._isMobile}`);
3151
- if (this._isMobile) {
3152
- this.classList.add("mobile");
3153
- console.log(`[ds-grid] Mobile class added`);
3154
- }
3155
- if (this._isMobile && typeof window !== "undefined") {
3156
- const screenWidth = window.innerWidth;
3157
- const columns = 14;
3158
- const gap = 0.5;
3159
- const totalGapWidth = (columns - 1) * gap;
3160
- const columnSize = (screenWidth - totalGapWidth) / columns;
3161
- console.log(`[ds-grid] Mobile grid: ${columns} columns \xD7 ${columnSize.toFixed(2)}px + ${totalGapWidth}px gaps = ${screenWidth}px`);
3162
- this.style.setProperty("--mobile-column-size", `${columnSize}px`);
3163
- this.style.setProperty("--mobile-gap", `${gap}px`);
3164
- }
3165
- }
3166
- updated() {
3167
- if (this._isMobile) {
3168
- this.classList.add("mobile");
3169
- } else {
3170
- this.classList.remove("mobile");
3171
- }
3172
- }
3173
3158
  render() {
3174
3159
  return x``;
3175
3160
  }
3176
3161
  };
3177
3162
  Grid.properties = {
3178
- align: { type: String },
3179
- _isMobile: { type: Boolean, state: true }
3163
+ align: { type: String }
3180
3164
  };
3181
3165
  Grid.styles = i4`
3182
3166
  :host {
@@ -3184,17 +3168,13 @@ Grid.styles = i4`
3184
3168
  margin-left: 0.5px !important;
3185
3169
  display: grid;
3186
3170
  width: 1440px;
3187
- height: 100%;
3171
+ height: 360px;
3188
3172
  grid-template-columns: repeat(auto-fill, 19px);
3189
3173
  grid-template-rows: repeat(auto-fill, 19px);
3190
3174
  gap: 1px;
3191
- row-rule: calc(1px * var(--scaling-factor)) solid
3192
- light-dark(rgb(147, 147, 147), rgb(147, 147, 147));
3193
- column-rule: calc(1px * var(--scaling-factor)) solid
3194
- light-dark(rgb(147, 147, 147), rgb(147, 147, 147));
3195
- outline:
3196
- 1px solid light-dark(rgb(147, 147, 147)),
3197
- rgb(147, 147, 147);
3175
+ row-rule: calc(1px * var(--sf)) solid var(--grid-color);
3176
+ column-rule: calc(1px * var(--sf)) solid var(--grid-color);
3177
+ outline: 1px solid black;
3198
3178
  position: fixed;
3199
3179
  top: 0;
3200
3180
  left: 50%;
@@ -3205,21 +3185,20 @@ Grid.styles = i4`
3205
3185
 
3206
3186
  /* DO NOT CHANGE THIS GRID CODE FOR MOBILE. ITS PERFECT FOR MOBILE. */
3207
3187
  :host(.mobile) {
3208
- outline: calc(2px * var(--scaling-factor)) solid rgba(251, 255, 0, 0.9);
3209
- width: calc(100% - calc(1px * var(--scaling-factor)));
3188
+ width: calc(100% - calc(1px * var(--sf)));
3210
3189
  max-width: 100vw;
3211
3190
  margin-left: 0 !important;
3212
3191
  margin-top: 0 !important;
3213
3192
  box-sizing: border-box;
3214
3193
  position: fixed;
3215
- top: calc(0.5px * var(--scaling-factor));
3194
+ top: calc(0.5px * var(--sf));
3216
3195
  left: 50%;
3217
3196
  transform: translateX(-50%);
3218
3197
  pointer-events: none;
3219
3198
  z-index: 300;
3220
- gap: calc(1px * var(--scaling-factor));
3221
- grid-template-columns: repeat(14, calc(19px * var(--scaling-factor)));
3222
- grid-template-rows: repeat(auto-fill, calc(19px * var(--scaling-factor)));
3199
+ gap: calc(1px * var(--sf));
3200
+ grid-template-columns: repeat(14, calc(19px * var(--sf)));
3201
+ grid-template-rows: repeat(auto-fill, calc(19px * var(--sf)));
3223
3202
  }
3224
3203
 
3225
3204
  :host([align="left"]) {
@@ -3242,26 +3221,66 @@ customElements.define("ds-grid", Grid);
3242
3221
 
3243
3222
  // dist/4-page/ds-layout.js
3244
3223
  var Layout = class extends i6 {
3224
+ constructor() {
3225
+ super(...arguments);
3226
+ this.mode = "portfolio";
3227
+ }
3245
3228
  render() {
3246
3229
  const isDebug = this.debug || this.mode === "debug";
3230
+ const isPortfolio = this.mode === "portfolio";
3247
3231
  const isCompany = this.mode === "company";
3232
+ const isApp = this.mode === "app";
3248
3233
  return x`
3249
3234
  <slot></slot>
3250
3235
  ${isDebug ? x`
3251
3236
  <div class="debug-overlay">
3252
- ${isCompany ? x`
3253
- <div class="debug-area debug-header">header</div>
3254
- <div class="debug-area debug-content">content</div>
3255
- <div class="debug-area debug-footer">footer</div>
3256
- ` : x`
3257
- <div class="debug-area debug-square">square</div>
3258
- <div class="debug-area debug-title">title</div>
3259
- <div class="debug-area debug-header">header</div>
3260
- <div class="debug-area debug-projects">projects</div>
3261
- <div class="debug-area debug-bio">bio</div>
3262
- <div class="debug-area debug-nav">nav</div>
3263
- <div class="debug-area debug-footer">footer</div>
3264
- `}
3237
+ ${isApp ? x`
3238
+ <div class="debug-area debug-banner">
3239
+ <ds-text key="banner">banner</ds-text>
3240
+ </div>
3241
+ <div class="debug-area debug-header">
3242
+ <ds-text key="header">header</ds-text>
3243
+ </div>
3244
+
3245
+ <div class="debug-area debug-main">
3246
+ <ds-text key="main">main</ds-text>
3247
+ </div>
3248
+ <div class="debug-area debug-footer-app">
3249
+ <ds-text key="footer">footer</ds-text>
3250
+ </div>
3251
+ ` : isCompany ? x`
3252
+ <div class="debug-area debug-header">
3253
+ <ds-text key="header">header</ds-text>
3254
+ </div>
3255
+ <div class="debug-area debug-content">
3256
+ <ds-text key="content">content</ds-text>
3257
+ </div>
3258
+ <div class="debug-area debug-footer">
3259
+ <ds-text key="footer">footer</ds-text>
3260
+ </div>
3261
+ ` : isPortfolio ? x`
3262
+ <div class="debug-area debug-square">
3263
+ <ds-text key="square">square</ds-text>
3264
+ </div>
3265
+ <div class="debug-area debug-title">
3266
+ <ds-text key="title">title</ds-text>
3267
+ </div>
3268
+ <div class="debug-area debug-header">
3269
+ <ds-text key="header">header</ds-text>
3270
+ </div>
3271
+ <div class="debug-area debug-projects">
3272
+ <ds-text key="projects">projects</ds-text>
3273
+ </div>
3274
+ <div class="debug-area debug-bio">
3275
+ <ds-text key="bio">bio</ds-text>
3276
+ </div>
3277
+ <div class="debug-area debug-nav">
3278
+ <ds-text key="nav">nav</ds-text>
3279
+ </div>
3280
+ <div class="debug-area debug-footer">
3281
+ <ds-text key="footer">footer</ds-text>
3282
+ </div>
3283
+ ` : ""}
3265
3284
  </div>
3266
3285
  ` : ""}
3267
3286
  `;
@@ -3275,6 +3294,11 @@ Layout.properties = {
3275
3294
  Layout.styles = i4`
3276
3295
  :host {
3277
3296
  display: grid;
3297
+ position: relative;
3298
+ width: 100%;
3299
+ }
3300
+
3301
+ :host([mode="portfolio"]) {
3278
3302
  grid-template-columns: 120px 480px 40px;
3279
3303
  grid-template-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
3280
3304
  grid-template-areas:
@@ -3291,8 +3315,6 @@ Layout.styles = i4`
3291
3315
  ". . .";
3292
3316
  min-height: 600px;
3293
3317
  background-color: rgba(165, 165, 165, 0.03);
3294
- position: relative;
3295
- width: 100%;
3296
3318
  max-width: 640px;
3297
3319
  margin: 0 auto;
3298
3320
  }
@@ -3326,6 +3348,29 @@ Layout.styles = i4`
3326
3348
  justify-self: end;
3327
3349
  }
3328
3350
 
3351
+ /* App mode - Base */
3352
+ :host([mode="app"]) {
3353
+ grid-template-columns: 1fr;
3354
+ grid-template-rows: calc(var(--1) * var(--sf)) 20px 1fr auto;
3355
+ grid-template-areas:
3356
+ "banner"
3357
+ "main"
3358
+ "footer";
3359
+ min-height: 100vh;
3360
+ background-color: transparent;
3361
+ width: 100%;
3362
+ margin: 0 auto;
3363
+ gap: 0;
3364
+ }
3365
+
3366
+ /* App mode - with scaling factor */
3367
+ :host([mode="app"]) {
3368
+ max-width: calc(400px * var(--sf, 1));
3369
+ padding: calc(60px * var(--sf, 1)) calc(28px * var(--sf, 1))
3370
+ calc(9.751px * var(--sf, 1));
3371
+ gap: calc(28px * var(--sf, 1));
3372
+ }
3373
+
3329
3374
  .debug-overlay {
3330
3375
  position: absolute;
3331
3376
  margin-left: -1px;
@@ -3338,6 +3383,9 @@ Layout.styles = i4`
3338
3383
  display: grid;
3339
3384
  font-size: 18px;
3340
3385
  font-weight: bold;
3386
+ }
3387
+
3388
+ :host([mode="portfolio"]) .debug-overlay {
3341
3389
  grid-template-columns: 120px 480px;
3342
3390
  grid-template-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
3343
3391
  grid-template-areas:
@@ -3373,7 +3421,7 @@ Layout.styles = i4`
3373
3421
  justify-content: center;
3374
3422
  font-size: 10px;
3375
3423
  font-weight: var(--type-weight-default);
3376
- font-family: var(--typeface);
3424
+ font-family: var(--typeface-regular);
3377
3425
  color: var(--black);
3378
3426
  border: 1px solid red;
3379
3427
  opacity: 1;
@@ -3409,13 +3457,49 @@ Layout.styles = i4`
3409
3457
 
3410
3458
  .debug-footer {
3411
3459
  grid-area: footer;
3412
- border-color: #ffa500;
3460
+ border-color: rgb(24, 147, 73);
3461
+ background-color: rgba(127, 123, 11, 0.1);
3413
3462
  }
3414
3463
 
3415
3464
  .debug-content {
3416
3465
  grid-area: content;
3417
3466
  border-color: rgba(71, 231, 71, 0.63);
3418
3467
  }
3468
+
3469
+ :host([mode="app"]) .debug-overlay {
3470
+ grid-template-columns: 1fr;
3471
+ grid-template-rows:
3472
+ calc(var(--1) * var(--sf))
3473
+ calc(var(--2) * var(--sf))
3474
+ calc(var(--4) * var(--sf))
3475
+ calc(var(--1) * var(--sf));
3476
+ grid-template-areas:
3477
+ "banner"
3478
+ "header"
3479
+ "main"
3480
+ "footer";
3481
+ }
3482
+
3483
+ .debug-banner {
3484
+ grid-area: banner;
3485
+ border-color: #daed09;
3486
+ }
3487
+
3488
+ .debug-header {
3489
+ grid-area: header;
3490
+ border-color: #0000ff;
3491
+ background-color: rgba(127, 123, 11, 0.5);
3492
+ }
3493
+
3494
+ .debug-main {
3495
+ grid-area: main;
3496
+ border-color: #0000ff;
3497
+ }
3498
+
3499
+ .debug-footer-app {
3500
+ grid-area: footer;
3501
+ border-color: #ffa500;
3502
+ }
3419
3503
  `;
3420
3504
  customElements.define("ds-layout", Layout);
3421
3505
  export {
@@ -3438,7 +3522,6 @@ export {
3438
3522
  getBrowserLanguage,
3439
3523
  getDeviceInfo,
3440
3524
  getLanguageDisplayName,
3441
- getNotionText,
3442
3525
  getPriceLabel,
3443
3526
  getText,
3444
3527
  hasTranslation,
@@ -3446,7 +3529,6 @@ export {
3446
3529
  loadTranslations,
3447
3530
  savePreferences,
3448
3531
  setLanguage,
3449
- setNotionText,
3450
3532
  setTheme,
3451
3533
  translate
3452
3534
  };