trueshade
Reactive icon

TrueShade

Stable version 1.1.1 (Compatible with OutSystems 11)
Uploaded
 on 4 Sep (12 days ago)
 by 
5.0
 (5 ratings)
trueshade

TrueShade

Compatible with:
Created on OutSystems 11

Version 1.1.1

Stable
Current
See documentation
Uploaded on 4 Sep (12 days ago) by 
Compatible with:
Version 11
11.9.2 or higher
11.7.6 to 11.9.0
11.0.539 to 11.0.615
Database:
All
Release notes:

Added validation for TrueShade availability

  • Implemented a safeguard to verify that window.TrueShade and window.TrueShade.Theme are defined before invoking public APIs.

  • Prevents runtime errors when the TrueShade library is not properly loaded.

  • Improves stability and ensures API calls are only made when the underlying objects are available.

Application Objects:
TrueShade has 1 AOs.

Version 1.1.0

Stable
See documentation
Uploaded on 25 Aug (3 weeks ago) by 
Compatible with:
Version 11
11.9.2 or higher
11.7.6 to 11.9.0
11.0.539 to 11.0.615
Database:
All
Release notes:

New Features


  • BroadcastChannel support

    Theme synchronization across multiple browser tabs/windows using BroadcastChannel (replaces storage event listeners).

  • Theme.OnChange(cb) API

    New subscription API for theme changes.

    • Callbacks now receive two arguments:

      • effective: resolved theme ('dark' | 'light')

      • raw: stored preference ('system-default' | 'dark' | 'light')

    • Backward compatible with single-argument callbacks.

  • Initial emit on Initialize()

    Subscribers get the current theme immediately after initialization.

  • Smarter caching

    Internal caching for module name, storage key, and last applied theme to reduce redundant localStorage lookups.


Improvements


  • Robust seeding (ensureSeeded()):

    Always guarantees a valid value (system-default) even when storage is unavailable (e.g., private mode).

  • Optimized setLayoutColorScheme():

    Avoids redundant writes to localStorage and DOM when the value didn’t change.

  • Better drift prevention:

    applyTheme() and onColorSchemeChange() now keep <html data-theme> strictly in sync with the chosen mode.

  • Error resilience:

    Listener and storage errors are safely swallowed to prevent breaking apps.

  • Enhanced dispose():

    Cleans up listeners, closes BroadcastChannel, clears subscribers, and resets internal state.


Removed / Changed

  • Removed window.storage event listener → replaced with BroadcastChannel.

  • getStorageKey() now caches results for efficiency.

  • setLayoutColorScheme() no longer always forces a write — it only updates when necessary.




Application Objects:
TrueShade has 1 AOs.

Version 1.0.2

Stable
See documentation
Uploaded on 22 Aug (4 weeks ago) by 
Compatible with:
Version 11
11.9.2 or higher
11.7.6 to 11.9.0
11.0.539 to 11.0.615
Database:
All
Release notes:

Changed

  • Storage key prefix updated from $NS_ to $OS_ to align with the naming convention of OutSystems Client Variables in localStorage.

  • Default mode token renamed from os-default to system-default to avoid ambiguity where OS could be interpreted as OutSystems instead of Operating System, and to improve clarity in Forge documentation.


Application Objects:
TrueShade has 1 AOs.