@marianmeres/stuic 2.55.0 → 2.56.0

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.
@@ -29,6 +29,7 @@ interface BreakpointValue {
29
29
  */
30
30
  export declare class Breakpoint {
31
31
  #private;
32
+ static get instance(): Breakpoint;
32
33
  get current(): string | null;
33
34
  get sm(): boolean;
34
35
  get md(): boolean;
@@ -29,6 +29,7 @@ const _breakpoints = [
29
29
  * ```
30
30
  */
31
31
  export class Breakpoint {
32
+ static #singleton;
32
33
  #bp = $derived.by(() => {
33
34
  const w = innerWidth.current || 0;
34
35
  return _breakpoints.reduce((m, [k, v]) => {
@@ -37,6 +38,9 @@ export class Breakpoint {
37
38
  return m;
38
39
  }, { current: null, sm: false, md: false, lg: false, xl: false, "2xl": false });
39
40
  });
41
+ static get instance() {
42
+ return (Breakpoint.#singleton ??= new Breakpoint());
43
+ }
40
44
  get current() {
41
45
  return this.#bp.current;
42
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "2.55.0",
3
+ "version": "2.56.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",