ds-one 0.2.5-alpha.11 → 0.2.5-alpha.13

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.
@@ -40,11 +40,15 @@ function initDeviceDetection() {
40
40
  const scalingFactor = actualWidth / designWidth;
41
41
  document.documentElement.style.setProperty("--sf", scalingFactor.toFixed(3));
42
42
  document.documentElement.style.setProperty("--sf", scalingFactor.toFixed(3));
43
+ document.documentElement.classList.add("mobile");
44
+ document.documentElement.classList.remove("desktop");
43
45
  console.log(`[DS one] Mobile device detected - ${deviceInfo.deviceType} (${deviceInfo.screenWidth}x${deviceInfo.screenHeight}), scaling factor: ${scalingFactor.toFixed(2)}`);
44
46
  } else {
45
47
  if (typeof document !== "undefined") {
46
48
  document.documentElement.style.setProperty("--sf", "1");
47
49
  document.documentElement.style.setProperty("--sf", "1");
50
+ document.documentElement.classList.add("desktop");
51
+ document.documentElement.classList.remove("mobile");
48
52
  }
49
53
  console.log(`[DS one] Desktop device detected (${deviceInfo.screenWidth}x${deviceInfo.screenHeight})`);
50
54
  }
@@ -1807,13 +1811,106 @@ var o7 = s5.litElementPolyfillSupport;
1807
1811
  o7?.({ LitElement: i6 });
1808
1812
  (s5.litElementVersions ?? (s5.litElementVersions = [])).push("4.2.1");
1809
1813
 
1814
+ // dist/2-core/ds-text.js
1815
+ var Text = class extends i6 {
1816
+ static get properties() {
1817
+ return {
1818
+ key: { type: String, reflect: true },
1819
+ defaultValue: { type: String, reflect: true, attribute: "default-value" },
1820
+ fallback: { type: String, reflect: true },
1821
+ // Kept for backward compatibility
1822
+ _text: { type: String, state: true }
1823
+ };
1824
+ }
1825
+ constructor() {
1826
+ super();
1827
+ this.key = "";
1828
+ this.defaultValue = "";
1829
+ this.fallback = "";
1830
+ this._text = "";
1831
+ this._currentLanguage = currentLanguage.value;
1832
+ this.boundHandlers = {
1833
+ languageChanged: (() => {
1834
+ console.log("Language changed event received in ds-text");
1835
+ this._currentLanguage = currentLanguage.value;
1836
+ this._updateLanguageAttribute();
1837
+ this._loadText();
1838
+ this.requestUpdate();
1839
+ })
1840
+ };
1841
+ }
1842
+ connectedCallback() {
1843
+ super.connectedCallback();
1844
+ this._currentLanguage = currentLanguage.value;
1845
+ this._updateLanguageAttribute();
1846
+ this._loadText();
1847
+ window.addEventListener("language-changed", this.boundHandlers.languageChanged);
1848
+ window.addEventListener("translations-loaded", this.boundHandlers.languageChanged);
1849
+ }
1850
+ disconnectedCallback() {
1851
+ super.disconnectedCallback();
1852
+ window.removeEventListener("language-changed", this.boundHandlers.languageChanged);
1853
+ window.removeEventListener("translations-loaded", this.boundHandlers.languageChanged);
1854
+ }
1855
+ updated(changedProperties) {
1856
+ super.updated(changedProperties);
1857
+ if (changedProperties.has("key") || changedProperties.has("defaultValue")) {
1858
+ this._loadText();
1859
+ }
1860
+ }
1861
+ _updateLanguageAttribute() {
1862
+ const lang = this._currentLanguage || currentLanguage.value;
1863
+ const primaryLang = lang?.toLowerCase().split(/[-_]/)[0] || "";
1864
+ if (primaryLang === "ja") {
1865
+ this.setAttribute("data-language", "ja");
1866
+ } else {
1867
+ this.removeAttribute("data-language");
1868
+ }
1869
+ }
1870
+ _loadText() {
1871
+ if (!this.key) {
1872
+ this._text = this.defaultValue || this.fallback || "";
1873
+ this._updateLanguageAttribute();
1874
+ this.requestUpdate();
1875
+ return;
1876
+ }
1877
+ try {
1878
+ const text = getText(this.key);
1879
+ this._text = text || this.defaultValue || this.fallback || this.key;
1880
+ } catch (error) {
1881
+ console.error("Error loading text for key:", this.key, error);
1882
+ this._text = this.defaultValue || this.fallback || this.key;
1883
+ }
1884
+ this._updateLanguageAttribute();
1885
+ this.requestUpdate();
1886
+ }
1887
+ render() {
1888
+ return x`<span>${this._text || this.defaultValue || this.key}</span>`;
1889
+ }
1890
+ };
1891
+ Text.styles = i4`
1892
+ :host {
1893
+ display: inline;
1894
+ font-family: var(--typeface-regular);
1895
+ font-size: var(--type-size-default);
1896
+ font-weight: var(--type-weight-default);
1897
+ line-height: calc(var(--type-lineheight-default) * var(--sf));
1898
+ letter-spacing: calc(var(--type-letterspacing-default) * var(--sf));
1899
+ text-align: var(--text-align-default);
1900
+ text-transform: var(--text-transform-default);
1901
+ text-decoration: var(--text-decoration-default);
1902
+ }
1903
+
1904
+ :host([data-language="ja"]) {
1905
+ font-family: var(--typeface-regular-jp);
1906
+ }
1907
+ `;
1908
+ customElements.define("ds-text", Text);
1909
+
1810
1910
  // dist/2-core/ds-button.js
1811
1911
  var Button = class extends i6 {
1812
1912
  constructor() {
1813
1913
  super();
1814
- this._handleLanguageChange = () => {
1815
- this._updateText();
1816
- };
1817
1914
  this.variant = "title";
1818
1915
  this.disabled = false;
1819
1916
  this.bold = false;
@@ -1825,35 +1922,12 @@ var Button = class extends i6 {
1825
1922
  this.defaultText = "";
1826
1923
  this.href = "";
1827
1924
  this._loading = false;
1828
- this._text = null;
1829
1925
  }
1830
1926
  connectedCallback() {
1831
1927
  super.connectedCallback();
1832
- this._updateText();
1833
- window.addEventListener("language-changed", this._handleLanguageChange);
1834
- }
1835
- disconnectedCallback() {
1836
- super.disconnectedCallback();
1837
- window.removeEventListener("language-changed", this._handleLanguageChange);
1838
- }
1839
- updated(changedProps) {
1840
- super.updated(changedProps);
1841
- if (changedProps.has("key") || changedProps.has("defaultText")) {
1842
- this._updateText();
1843
- }
1844
- }
1845
- /**
1846
- * Update text from translations (synchronous like Portfolio)
1847
- */
1848
- _updateText() {
1849
- if (this.key) {
1850
- this._text = getText(this.key);
1851
- } else {
1852
- this._text = this.defaultText || this.fallback || null;
1853
- }
1854
- this.requestUpdate();
1855
1928
  }
1856
1929
  render() {
1930
+ const hasTextProps = this.key || this.defaultText || this.fallback;
1857
1931
  return x`
1858
1932
  <button
1859
1933
  class=${this.variant}
@@ -1862,7 +1936,11 @@ var Button = class extends i6 {
1862
1936
  ?no-background=${this["no-background"]}
1863
1937
  @click=${this._handleClick}
1864
1938
  >
1865
- ${this._text ? this._text : x`<slot></slot>`}
1939
+ ${hasTextProps ? x`<ds-text
1940
+ .key=${this.key}
1941
+ .defaultValue=${this.defaultText}
1942
+ .fallback=${this.fallback}
1943
+ ></ds-text>` : x`<slot></slot>`}
1866
1944
  </button>
1867
1945
  `;
1868
1946
  }
@@ -1899,16 +1977,14 @@ Button.properties = {
1899
1977
  language: { type: String },
1900
1978
  defaultText: { type: String, attribute: "default-text" },
1901
1979
  href: { type: String },
1902
- _loading: { type: Boolean, state: true },
1903
- _text: { type: String, state: true }
1980
+ _loading: { type: Boolean, state: true }
1904
1981
  };
1905
1982
  Button.styles = i4`
1906
1983
  button {
1907
1984
  max-height: calc(var(--08) * var(--sf));
1908
1985
  border: none;
1909
1986
  cursor: pointer;
1910
- font-size: calc(var(--type-size-default) * var(--sf));
1911
- padding: 0 calc(1px * var(--sf));
1987
+ padding: 0 calc(2px * var(--sf));
1912
1988
  color: var(--button-text-color);
1913
1989
  font-family: var(--typeface-regular);
1914
1990
  }
@@ -2263,98 +2339,6 @@ Icon.iconNameToSvgMap = (() => {
2263
2339
  customElements.define("ds-icon", Icon);
2264
2340
  console.log("Icon component registered with custom elements registry");
2265
2341
 
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
-
2358
2342
  // dist/2-core/ds-cycle.js
2359
2343
  var saveAccentColor = (color) => {
2360
2344
  localStorage.setItem("accentColor", color);
@@ -2750,18 +2734,20 @@ var Cycle = class extends i6 {
2750
2734
  ${this.type === "notes-style-medium" || this.type === "icon-only" ? x`<span
2751
2735
  style="display: inline-flex; align-items: center; gap: var(--025)"
2752
2736
  >${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>`}
2737
+ >` : this.type === "language" ? x`<ds-text
2738
+ default-value=${this.getValueDisplay(this.currentValue)}
2739
+ ></ds-text>` : this.type === "theme" ? x`<ds-text
2740
+ key=${this.currentValue}
2741
+ default-value=${this.currentValue}
2742
+ ></ds-text>` : this.type === "accent-color" ? x`<ds-text
2743
+ key=${this.getColorKey(this.currentValue)}
2744
+ default-value=${this.getColorName(this.currentValue)}
2745
+ ></ds-text>` : this.type === "page-style" ? x`<ds-text
2746
+ key=${this.currentValue}
2747
+ default-value=${this.currentValue}
2748
+ ></ds-text>` : x`<ds-text
2749
+ default-value=${this.getValueDisplay(this.currentValue)}
2750
+ ></ds-text>`}
2765
2751
  </ds-button>
2766
2752
  ${this.type === "accent-color" ? x`
2767
2753
  <div
@@ -3153,8 +3139,81 @@ DsTable.styles = i4`
3153
3139
  `;
3154
3140
  customElements.define("ds-table", DsTable);
3155
3141
 
3142
+ // dist/4-page/ds-container.js
3143
+ var Container = class extends i6 {
3144
+ render() {
3145
+ return x`<slot></slot>`;
3146
+ }
3147
+ };
3148
+ Container.styles = i4`
3149
+ :host {
3150
+ display: flex;
3151
+ width: 100%;
3152
+ max-width: 100%;
3153
+ flex-direction: column;
3154
+ box-sizing: border-box;
3155
+ }
3156
+
3157
+ /* Ensure children don't overflow */
3158
+ :host ::slotted(*) {
3159
+ max-width: 100%;
3160
+ box-sizing: border-box;
3161
+ }
3162
+
3163
+ /* Mobile: 100% width */
3164
+ @media (max-width: 820px) {
3165
+ :host {
3166
+ width: 100%;
3167
+ max-width: 100%;
3168
+ }
3169
+ }
3170
+
3171
+ /* Desktop: max-width 1000px, centered */
3172
+ @media (min-width: 821px) {
3173
+ :host {
3174
+ max-width: 1000px;
3175
+ margin-left: auto;
3176
+ margin-right: auto;
3177
+ width: 100%;
3178
+ }
3179
+ }
3180
+ `;
3181
+ customElements.define("ds-container", Container);
3182
+
3156
3183
  // dist/4-page/ds-grid.js
3157
3184
  var Grid = class extends i6 {
3185
+ connectedCallback() {
3186
+ super.connectedCallback();
3187
+ this.updateMobileClass();
3188
+ this.resizeObserver = () => {
3189
+ if (this.resizeTimeout) {
3190
+ clearTimeout(this.resizeTimeout);
3191
+ }
3192
+ this.resizeTimeout = setTimeout(() => {
3193
+ this.updateMobileClass();
3194
+ }, 100);
3195
+ };
3196
+ window.addEventListener("resize", this.resizeObserver);
3197
+ }
3198
+ disconnectedCallback() {
3199
+ super.disconnectedCallback();
3200
+ if (this.resizeObserver) {
3201
+ window.removeEventListener("resize", this.resizeObserver);
3202
+ }
3203
+ if (this.resizeTimeout) {
3204
+ clearTimeout(this.resizeTimeout);
3205
+ }
3206
+ }
3207
+ updateMobileClass() {
3208
+ const isMobile = detectMobileDevice();
3209
+ if (isMobile) {
3210
+ this.classList.add("mobile");
3211
+ this.classList.remove("desktop");
3212
+ } else {
3213
+ this.classList.add("desktop");
3214
+ this.classList.remove("mobile");
3215
+ }
3216
+ }
3158
3217
  render() {
3159
3218
  return x``;
3160
3219
  }
@@ -3168,13 +3227,13 @@ Grid.styles = i4`
3168
3227
  margin-left: 0.5px !important;
3169
3228
  display: grid;
3170
3229
  width: 1440px;
3171
- height: 360px;
3230
+ height: 1280px;
3172
3231
  grid-template-columns: repeat(auto-fill, 19px);
3173
3232
  grid-template-rows: repeat(auto-fill, 19px);
3174
3233
  gap: 1px;
3175
3234
  row-rule: calc(1px * var(--sf)) solid var(--grid-color);
3176
3235
  column-rule: calc(1px * var(--sf)) solid var(--grid-color);
3177
- outline: 1px solid black;
3236
+ outline: calc(1px * var(--sf)) solid var(--yellow);
3178
3237
  position: fixed;
3179
3238
  top: 0;
3180
3239
  left: 50%;
@@ -3187,7 +3246,7 @@ Grid.styles = i4`
3187
3246
  :host(.mobile) {
3188
3247
  width: calc(100% - calc(1px * var(--sf)));
3189
3248
  max-width: 100vw;
3190
- margin-left: 0 !important;
3249
+ margin-left: 0.5px !important;
3191
3250
  margin-top: 0 !important;
3192
3251
  box-sizing: border-box;
3193
3252
  position: fixed;
@@ -3226,58 +3285,58 @@ var Layout = class extends i6 {
3226
3285
  this.mode = "portfolio";
3227
3286
  }
3228
3287
  render() {
3229
- const isDebug = this.debug || this.mode === "debug";
3288
+ const isView = this.view || this.mode === "view";
3230
3289
  const isPortfolio = this.mode === "portfolio";
3231
3290
  const isCompany = this.mode === "company";
3232
3291
  const isApp = this.mode === "app";
3233
3292
  return x`
3234
3293
  <slot></slot>
3235
- ${isDebug ? x`
3236
- <div class="debug-overlay">
3294
+ ${isView ? x`
3295
+ <div class="view-overlay">
3237
3296
  ${isApp ? x`
3238
- <div class="debug-area debug-banner">
3297
+ <div class="view-area view-banner">
3239
3298
  <ds-text key="banner">banner</ds-text>
3240
3299
  </div>
3241
- <div class="debug-area debug-header">
3300
+ <div class="view-area view-header">
3242
3301
  <ds-text key="header">header</ds-text>
3243
3302
  </div>
3244
3303
 
3245
- <div class="debug-area debug-main">
3304
+ <div class="view-area view-main">
3246
3305
  <ds-text key="main">main</ds-text>
3247
3306
  </div>
3248
- <div class="debug-area debug-footer-app">
3307
+ <div class="view-area view-footer">
3249
3308
  <ds-text key="footer">footer</ds-text>
3250
3309
  </div>
3251
3310
  ` : isCompany ? x`
3252
- <div class="debug-area debug-header">
3311
+ <div class="view-area view-header">
3253
3312
  <ds-text key="header">header</ds-text>
3254
3313
  </div>
3255
- <div class="debug-area debug-content">
3314
+ <div class="view-area view-content">
3256
3315
  <ds-text key="content">content</ds-text>
3257
3316
  </div>
3258
- <div class="debug-area debug-footer">
3317
+ <div class="view-area view-footer">
3259
3318
  <ds-text key="footer">footer</ds-text>
3260
3319
  </div>
3261
3320
  ` : isPortfolio ? x`
3262
- <div class="debug-area debug-square">
3321
+ <div class="view-area view-square">
3263
3322
  <ds-text key="square">square</ds-text>
3264
3323
  </div>
3265
- <div class="debug-area debug-title">
3324
+ <div class="view-area view-title">
3266
3325
  <ds-text key="title">title</ds-text>
3267
3326
  </div>
3268
- <div class="debug-area debug-header">
3327
+ <div class="view-area view-header">
3269
3328
  <ds-text key="header">header</ds-text>
3270
3329
  </div>
3271
- <div class="debug-area debug-projects">
3330
+ <div class="view-area view-projects">
3272
3331
  <ds-text key="projects">projects</ds-text>
3273
3332
  </div>
3274
- <div class="debug-area debug-bio">
3333
+ <div class="view-area view-bio">
3275
3334
  <ds-text key="bio">bio</ds-text>
3276
3335
  </div>
3277
- <div class="debug-area debug-nav">
3336
+ <div class="view-area view-nav">
3278
3337
  <ds-text key="nav">nav</ds-text>
3279
3338
  </div>
3280
- <div class="debug-area debug-footer">
3339
+ <div class="view-area view-footer">
3281
3340
  <ds-text key="footer">footer</ds-text>
3282
3341
  </div>
3283
3342
  ` : ""}
@@ -3289,7 +3348,7 @@ var Layout = class extends i6 {
3289
3348
  Layout.properties = {
3290
3349
  mode: { type: String },
3291
3350
  align: { type: String },
3292
- debug: { type: Boolean }
3351
+ view: { type: Boolean }
3293
3352
  };
3294
3353
  Layout.styles = i4`
3295
3354
  :host {
@@ -3299,79 +3358,103 @@ Layout.styles = i4`
3299
3358
  }
3300
3359
 
3301
3360
  :host([mode="portfolio"]) {
3302
- grid-template-columns: 120px 480px 40px;
3303
- grid-template-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
3304
- grid-template-areas:
3305
- "square . ."
3306
- ". title ."
3307
- ". header ."
3308
- ". projects ."
3309
- ". . ."
3310
- ". bio ."
3311
- ". . ."
3312
- ". nav ."
3313
- ". . ."
3314
- ". footer ."
3315
- ". . .";
3361
+ --portfolio-cols: 120px 480px 40px;
3362
+ --portfolio-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
3363
+ --portfolio-areas: "square . ." ". title ." ". header ." ". projects ."
3364
+ ". . ." ". bio ." ". . ." ". nav ." ". . ." ". footer ." ". . .";
3365
+ --portfolio-overlay-cols: 120px 480px;
3366
+ --portfolio-overlay-areas: "square ." ". title" ". header" ". projects"
3367
+ ". ." ". bio" ". ." ". nav" ". ." ". footer" ". .";
3368
+ grid-template-columns: var(--portfolio-cols);
3369
+ grid-template-rows: var(--portfolio-rows);
3370
+ grid-template-areas: var(--portfolio-areas);
3316
3371
  min-height: 600px;
3317
3372
  background-color: rgba(165, 165, 165, 0.03);
3318
3373
  max-width: 640px;
3319
- margin: 0 auto;
3374
+ margin: 0;
3375
+ }
3376
+
3377
+ :host([mode="portfolio"]) .view-overlay {
3378
+ grid-template-columns: var(--portfolio-overlay-cols);
3379
+ grid-template-rows: var(--portfolio-rows);
3380
+ grid-template-areas: var(--portfolio-overlay-areas);
3320
3381
  }
3321
3382
 
3322
3383
  :host([mode="company"]) {
3323
- grid-template-columns: auto 400px auto;
3324
- grid-template-rows: 80px 20px 20px 120px 20px 120px;
3325
- grid-template-areas:
3326
- ". . ."
3327
- ". header ."
3328
- ". . ."
3329
- ". content ."
3330
- ". . ."
3384
+ --company-cols: auto 400px auto;
3385
+ --company-rows: 80px 20px 20px 120px 20px 120px;
3386
+ --company-areas: ". . ." ". header ." ". . ." ". content ." ". . ."
3331
3387
  ". footer .";
3388
+ grid-template-columns: var(--company-cols);
3389
+ grid-template-rows: var(--company-rows);
3390
+ grid-template-areas: var(--company-areas);
3332
3391
  gap: 0;
3333
3392
  max-width: 100%;
3334
3393
  }
3335
3394
 
3336
- :host([align="left"]) {
3395
+ :host([mode="company"]) .view-overlay {
3396
+ grid-template-columns: var(--company-cols);
3397
+ grid-template-rows: var(--company-rows);
3398
+ grid-template-areas: var(--company-areas);
3399
+ gap: 0;
3400
+ }
3401
+
3402
+ :host([align="left"]),
3403
+ :host([mode="portfolio"][align="left"]),
3404
+ :host([mode="company"][align="left"]),
3405
+ :host([mode="app"][align="left"]) {
3337
3406
  margin: 0;
3338
3407
  justify-self: start;
3339
3408
  }
3340
3409
 
3341
- :host([align="center"]) {
3410
+ :host([align="center"]),
3411
+ :host([mode="portfolio"][align="center"]),
3412
+ :host([mode="company"][align="center"]),
3413
+ :host([mode="app"][align="center"]) {
3342
3414
  margin: 0 auto;
3343
3415
  justify-self: center;
3344
3416
  }
3345
3417
 
3346
- :host([align="right"]) {
3418
+ :host([align="right"]),
3419
+ :host([mode="portfolio"][align="right"]),
3420
+ :host([mode="company"][align="right"]),
3421
+ :host([mode="app"][align="right"]) {
3347
3422
  margin: 0 0 0 auto;
3348
3423
  justify-self: end;
3349
3424
  }
3350
3425
 
3351
3426
  /* App mode - Base */
3352
3427
  :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";
3428
+ --app-cols: calc(var(--double) * var(--sf));
3429
+ --app-rows: calc(var(--unit) * var(--sf)) calc(var(--2) * var(--sf))
3430
+ calc(var(--unit) * var(--sf)) calc(var(--unit) * var(--sf))
3431
+ calc(var(--unit) * var(--sf));
3432
+ --app-areas: "1" "." "2" "." "3";
3433
+ --app-overlay-cols: calc(var(--oct) * var(--sf));
3434
+ --app-overlay-rows: calc(var(--unit) * var(--sf))
3435
+ calc(var(--double) * var(--sf)) calc(var(--unit) * var(--sf))
3436
+ calc(var(--unit) * var(--sf));
3437
+ --app-overlay-areas: "banner" "." "header" "." "main" "." "footer";
3438
+ grid-template-columns: var(--app-cols);
3439
+ grid-template-rows: var(--app-rows);
3440
+ grid-template-areas: var(--app-areas);
3359
3441
  min-height: 100vh;
3360
3442
  background-color: transparent;
3361
3443
  width: 100%;
3362
- margin: 0 auto;
3363
3444
  gap: 0;
3364
- }
3365
-
3366
- /* App mode - with scaling factor */
3367
- :host([mode="app"]) {
3368
3445
  max-width: calc(400px * var(--sf, 1));
3369
3446
  padding: calc(60px * var(--sf, 1)) calc(28px * var(--sf, 1))
3370
3447
  calc(9.751px * var(--sf, 1));
3371
3448
  gap: calc(28px * var(--sf, 1));
3372
3449
  }
3373
3450
 
3374
- .debug-overlay {
3451
+ :host([mode="app"]) .view-overlay {
3452
+ grid-template-columns: var(--app-overlay-cols);
3453
+ grid-template-rows: var(--app-overlay-rows);
3454
+ grid-template-areas: var(--app-overlay-areas);
3455
+ }
3456
+
3457
+ .view-overlay {
3375
3458
  position: absolute;
3376
3459
  margin-left: -1px;
3377
3460
  top: 0;
@@ -3385,37 +3468,7 @@ Layout.styles = i4`
3385
3468
  font-weight: bold;
3386
3469
  }
3387
3470
 
3388
- :host([mode="portfolio"]) .debug-overlay {
3389
- grid-template-columns: 120px 480px;
3390
- grid-template-rows: 120px 120px 60px 180px 60px 120px 60px 20px 120px 120px;
3391
- grid-template-areas:
3392
- "square ."
3393
- ". title"
3394
- ". header"
3395
- ". projects"
3396
- ". ."
3397
- ". bio"
3398
- ". ."
3399
- ". nav"
3400
- ". ."
3401
- ". footer"
3402
- ". .";
3403
- }
3404
-
3405
- :host([mode="company"]) .debug-overlay {
3406
- grid-template-columns: auto 400px auto;
3407
- grid-template-rows: 80px 20px 20px 120px 20px 120px;
3408
- grid-template-areas:
3409
- ". . ."
3410
- ". header ."
3411
- ". . ."
3412
- ". content ."
3413
- ". . ."
3414
- ". footer .";
3415
- gap: 0;
3416
- }
3417
-
3418
- .debug-area {
3471
+ .view-area {
3419
3472
  display: flex;
3420
3473
  align-items: center;
3421
3474
  justify-content: center;
@@ -3423,87 +3476,99 @@ Layout.styles = i4`
3423
3476
  font-weight: var(--type-weight-default);
3424
3477
  font-family: var(--typeface-regular);
3425
3478
  color: var(--black);
3426
- border: 1px solid red;
3479
+ border: 1px solid;
3427
3480
  opacity: 1;
3428
3481
  }
3429
3482
 
3430
- .debug-square {
3483
+ :host([mode="portfolio"]) .view-area:nth-of-type(1) {
3484
+ border-color: var(--tuned-red);
3485
+ }
3486
+ :host([mode="portfolio"]) .view-area:nth-of-type(2) {
3487
+ border-color: var(--sharp-blue);
3488
+ }
3489
+ :host([mode="portfolio"]) .view-area:nth-of-type(3) {
3490
+ border-color: var(--yellow);
3491
+ }
3492
+ :host([mode="portfolio"]) .view-area:nth-of-type(4) {
3493
+ border-color: var(--apple-green);
3494
+ }
3495
+ :host([mode="portfolio"]) .view-area:nth-of-type(5) {
3496
+ border-color: var(--pink);
3497
+ }
3498
+ :host([mode="portfolio"]) .view-area:nth-of-type(6) {
3499
+ border-color: var(--orange);
3500
+ }
3501
+ :host([mode="portfolio"]) .view-area:nth-of-type(7) {
3502
+ border-color: var(--zenith-blue);
3503
+ }
3504
+
3505
+ :host([mode="company"]) .view-area:nth-of-type(1) {
3506
+ border-color: var(--tuned-red);
3507
+ }
3508
+ :host([mode="company"]) .view-area:nth-of-type(2) {
3509
+ border-color: var(--sharp-blue);
3510
+ }
3511
+ :host([mode="company"]) .view-area:nth-of-type(3) {
3512
+ border-color: var(--yellow);
3513
+ }
3514
+
3515
+ :host([mode="app"]) .view-area:nth-of-type(1) {
3516
+ border-color: var(--tuned-red);
3517
+ }
3518
+ :host([mode="app"]) .view-area:nth-of-type(2) {
3519
+ border-color: var(--sharp-blue);
3520
+ }
3521
+ :host([mode="app"]) .view-area:nth-of-type(3) {
3522
+ border-color: var(--yellow);
3523
+ }
3524
+ :host([mode="app"]) .view-area:nth-of-type(4) {
3525
+ border-color: var(--apple-green);
3526
+ }
3527
+
3528
+ .view-square {
3431
3529
  grid-area: square;
3432
3530
  }
3433
3531
 
3434
- .debug-title {
3532
+ .view-title {
3435
3533
  grid-area: title;
3436
3534
  }
3437
3535
 
3438
- .debug-header {
3536
+ .view-header {
3439
3537
  grid-area: header;
3440
- border-color: #0000ff;
3441
3538
  }
3442
3539
 
3443
- .debug-projects {
3540
+ .view-projects {
3444
3541
  grid-area: projects;
3445
- border-color: #ffff00;
3446
3542
  }
3447
3543
 
3448
- .debug-bio {
3544
+ .view-bio {
3449
3545
  grid-area: bio;
3450
- border-color: #ff00ff;
3451
3546
  }
3452
3547
 
3453
- .debug-nav {
3548
+ .view-nav {
3454
3549
  grid-area: nav;
3455
- border-color: #00ffff;
3456
3550
  }
3457
3551
 
3458
- .debug-footer {
3552
+ .view-footer {
3459
3553
  grid-area: footer;
3460
- border-color: rgb(24, 147, 73);
3461
- background-color: rgba(127, 123, 11, 0.1);
3462
3554
  }
3463
3555
 
3464
- .debug-content {
3556
+ .view-content {
3465
3557
  grid-area: content;
3466
- border-color: rgba(71, 231, 71, 0.63);
3467
3558
  }
3468
3559
 
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 {
3560
+ .view-banner {
3484
3561
  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
3562
  }
3493
3563
 
3494
- .debug-main {
3564
+ .view-main {
3495
3565
  grid-area: main;
3496
- border-color: #0000ff;
3497
- }
3498
-
3499
- .debug-footer-app {
3500
- grid-area: footer;
3501
- border-color: #ffa500;
3502
3566
  }
3503
3567
  `;
3504
3568
  customElements.define("ds-layout", Layout);
3505
3569
  export {
3506
3570
  Button,
3571
+ Container,
3507
3572
  Cycle,
3508
3573
  DateComponent,
3509
3574
  DsTable,