Skip to content

Commit 0a850d6

Browse files
author
lessjs-bot
committed
fix(www): add openPropsTokenSheet to islands missing theme tokens
- shoelace-showcase: add openPropsTokenSheet for dark mode theme switching - reactive-showcase: add openPropsTokenSheet for dark mode theme switching - less-term: add openPropsTokenSheet for dark mode theme switching - less-toc: add openPropsTokenSheet for dark mode theme switching- react-showcase and media-chrome-showcase use custom base classes (WithDsdHydration, MediaChromeBase) and require separate theme integration.
1 parent 7432418 commit 0a850d6

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎www/app/islands/less-term.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Pure DsdElement - zero Lit dependency.
1414
*/
1515
import { DsdElement, html, signal, StyleSheet } from '@lessjs/runtime';
16+
import { openPropsTokenSheet } from '@lessjs/ui/open-props-tokens';
1617

1718
const styles = new StyleSheet();
1819
styles.replaceSync(`
@@ -75,7 +76,7 @@ styles.replaceSync(`
7576
`);
7677

7778
export class LessTermDemo extends DsdElement {
78-
static override styles = styles;
79+
static override styles = [openPropsTokenSheet, styles];
7980

8081
/** Command history (signal for consistency with reactive DSD pattern). */
8182
#cmdHistory = signal<string[]>([]);

‎www/app/islands/less-toc.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* _updateDOM() removed; signals auto-trigger re-render via _patchBindings().
1111
*/
1212
import { DsdElement, html, signal, StyleSheet } from '@lessjs/runtime';
13+
import { openPropsTokenSheet } from '@lessjs/ui/open-props-tokens';
1314

1415
export const tagName = 'less-toc';
1516

@@ -67,7 +68,7 @@ styles.replaceSync(`
6768
`);
6869

6970
export default class LessToc extends DsdElement {
70-
static override styles = styles;
71+
static override styles = [openPropsTokenSheet, styles];
7172

7273
/** Reactive headings list. Signal writes trigger _patchBindings() → re-render. */
7374
#headings = signal<Array<{ level: number; id: string; text: string }>>([]);

‎www/app/islands/reactive-showcase.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* Replaces Lit Island pattern with Ocean (DsdElement) reactivity.
1111
*/
1212
import { computed, DsdElement, html, signal, StyleSheet } from '@lessjs/runtime';
13+
import { openPropsTokenSheet } from '@lessjs/ui/open-props-tokens';
1314

1415
export const tagName = 'reactive-showcase';
1516

@@ -78,7 +79,7 @@ const FRAMEWORKS = [
7879
];
7980

8081
export default class ReactiveShowcase extends DsdElement {
81-
static override styles = showcaseStyles;
82+
static override styles = [openPropsTokenSheet, showcaseStyles];
8283

8384
#count = signal(0);
8485
#isDark = signal(false);

‎www/app/islands/shoelace-showcase.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @lessjs/app island - Shoelace WCs need client DOM, but static wrapper renders via DSD.
99
*/
1010
import { DsdElement, html, StyleSheet } from '@lessjs/runtime';
11+
import { openPropsTokenSheet } from '@lessjs/ui/open-props-tokens';
1112
import '@shoelace-style/shoelace/dist/themes/light.css';
1213

1314
// Explicit component imports to prevent Rolldown tree-shaking.
@@ -58,7 +59,7 @@ styles.replaceSync(`
5859
`);
5960

6061
export default class ShoelaceShowcase extends DsdElement {
61-
static override styles = styles;
62+
static override styles = [openPropsTokenSheet, styles];
6263

6364
override render() {
6465
return html`

0 commit comments

Comments
 (0)