@wallarm-org/design-system 0.67.3 → 0.68.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.
Files changed (96) hide show
  1. package/dist/components/AnimatedBackground/AnimatedBackground.d.ts +8 -1
  2. package/dist/components/AnimatedBackground/AnimatedBackground.js +9 -118
  3. package/dist/components/AnimatedBackground/blur/BlurBackground.d.ts +6 -0
  4. package/dist/components/AnimatedBackground/blur/BlurBackground.js +129 -0
  5. package/dist/components/AnimatedBackground/blur/index.d.ts +1 -0
  6. package/dist/components/AnimatedBackground/blur/index.js +2 -0
  7. package/dist/components/AnimatedBackground/index.d.ts +3 -2
  8. package/dist/components/AnimatedBackground/index.js +3 -1
  9. package/dist/components/AnimatedBackground/{GameHud.js → pixel/GameHud.js} +1 -1
  10. package/dist/components/AnimatedBackground/pixel/PixelBackground.d.ts +11 -0
  11. package/dist/components/AnimatedBackground/pixel/PixelBackground.js +102 -0
  12. package/dist/components/AnimatedBackground/pixel/index.d.ts +1 -0
  13. package/dist/components/AnimatedBackground/pixel/index.js +2 -0
  14. package/dist/components/AnimatedBackground/{module → pixel/module}/game-logic.js +1 -1
  15. package/dist/components/AnimatedBackground/{module → pixel/module}/index.d.ts +1 -1
  16. package/dist/components/AnimatedBackground/pixel/module/lib.d.ts +2 -0
  17. package/dist/components/AnimatedBackground/pixel/module/lib.js +16 -0
  18. package/dist/components/AnimatedBackground/pixel/module/types.d.ts +38 -0
  19. package/dist/components/Calendar/CalendarInputHeader.js +31 -5
  20. package/dist/components/InputGroup/InputGroup.js +1 -1
  21. package/dist/components/InputGroup/InputGroupAddon.d.ts +1 -1
  22. package/dist/components/InputGroup/InputGroupAddon.js +3 -2
  23. package/dist/components/NavPanel/NavPanelContext.d.ts +9 -1
  24. package/dist/components/NavPanel/NavPanelContext.js +14 -1
  25. package/dist/components/NavPanel/NavPanelGroup.d.ts +1 -3
  26. package/dist/components/NavPanel/NavPanelGroup.js +1 -5
  27. package/dist/components/NavPanel/NavPanelGroupContent.d.ts +1 -1
  28. package/dist/components/NavPanel/NavPanelGroupContent.js +21 -19
  29. package/dist/components/NavPanel/NavPanelGroupItem.js +3 -2
  30. package/dist/components/NavPanel/NavPanelGroupLabel.js +4 -2
  31. package/dist/components/Textarea/Textarea.d.ts +8 -8
  32. package/dist/components/Textarea/Textarea.js +24 -17
  33. package/dist/components/Textarea/classes.d.ts +6 -0
  34. package/dist/components/Textarea/classes.js +20 -0
  35. package/dist/components/Textarea/useAutoResize.d.ts +4 -0
  36. package/dist/components/Textarea/useAutoResize.js +34 -0
  37. package/dist/components/Tree/Tree.d.ts +9 -0
  38. package/dist/components/Tree/Tree.js +48 -0
  39. package/dist/components/Tree/TreeContext.d.ts +11 -0
  40. package/dist/components/Tree/TreeContext.js +19 -0
  41. package/dist/components/Tree/TreeItem.d.ts +10 -0
  42. package/dist/components/Tree/TreeItem.js +46 -0
  43. package/dist/components/Tree/TreeItemContent.d.ts +6 -0
  44. package/dist/components/Tree/TreeItemContent.js +26 -0
  45. package/dist/components/Tree/TreeItemContext.d.ts +8 -0
  46. package/dist/components/Tree/TreeItemContext.js +11 -0
  47. package/dist/components/Tree/TreeItemHeader.d.ts +8 -0
  48. package/dist/components/Tree/TreeItemHeader.js +57 -0
  49. package/dist/components/Tree/TreeItemIcon.d.ts +5 -0
  50. package/dist/components/Tree/TreeItemIcon.js +40 -0
  51. package/dist/components/Tree/index.d.ts +5 -0
  52. package/dist/components/Tree/index.js +6 -0
  53. package/dist/components/TreeBase/TreeBase.d.ts +31 -0
  54. package/dist/components/TreeBase/TreeBase.js +56 -0
  55. package/dist/components/TreeBase/classes.d.ts +7 -0
  56. package/dist/components/TreeBase/classes.js +10 -0
  57. package/dist/components/TreeBase/index.d.ts +1 -0
  58. package/dist/components/TreeBase/index.js +2 -0
  59. package/dist/index.d.ts +1 -0
  60. package/dist/index.js +2 -1
  61. package/dist/metadata/components.json +3561 -1486
  62. package/dist/theme/components/animated-background.css +117 -0
  63. package/dist/theme/index.css +1 -1
  64. package/package.json +1 -1
  65. package/dist/components/AnimatedBackground/module/lib.d.ts +0 -2
  66. package/dist/components/AnimatedBackground/module/lib.js +0 -32
  67. package/dist/components/AnimatedBackground/module/types.d.ts +0 -79
  68. package/dist/theme/components/login-background.css +0 -45
  69. /package/dist/components/AnimatedBackground/{GameHud.d.ts → pixel/GameHud.d.ts} +0 -0
  70. /package/dist/components/AnimatedBackground/{module → pixel/module}/celebration-renderer.d.ts +0 -0
  71. /package/dist/components/AnimatedBackground/{module → pixel/module}/celebration-renderer.js +0 -0
  72. /package/dist/components/AnimatedBackground/{module → pixel/module}/celebration.d.ts +0 -0
  73. /package/dist/components/AnimatedBackground/{module → pixel/module}/celebration.js +0 -0
  74. /package/dist/components/AnimatedBackground/{module → pixel/module}/constants.d.ts +0 -0
  75. /package/dist/components/AnimatedBackground/{module → pixel/module}/constants.js +0 -0
  76. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine-colors.d.ts +0 -0
  77. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine-colors.js +0 -0
  78. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine-grid.d.ts +0 -0
  79. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine-grid.js +0 -0
  80. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine.d.ts +0 -0
  81. /package/dist/components/AnimatedBackground/{module → pixel/module}/engine.js +0 -0
  82. /package/dist/components/AnimatedBackground/{module → pixel/module}/game-logic.d.ts +0 -0
  83. /package/dist/components/AnimatedBackground/{module → pixel/module}/game-plugins.d.ts +0 -0
  84. /package/dist/components/AnimatedBackground/{module → pixel/module}/game-plugins.js +0 -0
  85. /package/dist/components/AnimatedBackground/{module → pixel/module}/game-renderer.d.ts +0 -0
  86. /package/dist/components/AnimatedBackground/{module → pixel/module}/game-renderer.js +0 -0
  87. /package/dist/components/AnimatedBackground/{module → pixel/module}/index.js +0 -0
  88. /package/dist/components/AnimatedBackground/{module → pixel/module}/math.d.ts +0 -0
  89. /package/dist/components/AnimatedBackground/{module → pixel/module}/math.js +0 -0
  90. /package/dist/components/AnimatedBackground/{module → pixel/module}/sfx.d.ts +0 -0
  91. /package/dist/components/AnimatedBackground/{module → pixel/module}/sfx.js +0 -0
  92. /package/dist/components/AnimatedBackground/{module → pixel/module}/types.js +0 -0
  93. /package/dist/components/AnimatedBackground/{module → pixel/module}/useGame.d.ts +0 -0
  94. /package/dist/components/AnimatedBackground/{module → pixel/module}/useGame.js +0 -0
  95. /package/dist/components/AnimatedBackground/{module → pixel/module}/useGameKeyboard.d.ts +0 -0
  96. /package/dist/components/AnimatedBackground/{module → pixel/module}/useGameKeyboard.js +0 -0
@@ -1,3 +1,10 @@
1
1
  import type { FC } from 'react';
2
- import type { AnimatedBackgroundProps } from './module';
2
+ import { type BlurBackgroundProps } from './blur';
3
+ import { type PixelBackgroundProps } from './pixel';
4
+ type AnimatedBackgroundProps = ({
5
+ variant?: 'pixel';
6
+ } & PixelBackgroundProps) | ({
7
+ variant?: 'blur';
8
+ } & BlurBackgroundProps);
9
+ export type { AnimatedBackgroundProps };
3
10
  export declare const AnimatedBackground: FC<AnimatedBackgroundProps>;
@@ -1,121 +1,12 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { useEffect, useRef } from "react";
3
- import { cn } from "../../utils/cn.js";
4
- import { createSweepEngine, resolveOptions, useGame } from "./module/index.js";
5
- const AnimatedBackground = (props)=>{
6
- const { ref, texture, paused, game = false, excludeCardSize, className, children, ...rest } = props;
7
- const canvasRef = useRef(null);
8
- const engineRef = useRef(null);
9
- const reducedMotionRef = useRef(null);
10
- const options = resolveOptions(props);
11
- const optionsRef = useRef(options);
12
- const pausedRef = useRef(paused);
13
- useEffect(()=>{
14
- optionsRef.current = options;
15
- pausedRef.current = paused;
16
- });
17
- const isHalftone = (texture ?? 'halftone') === 'halftone';
18
- const { gameActive, onPointerDown, hudElement, onEngineCreated, onEngineDestroyed } = useGame({
19
- game,
20
- isHalftone,
21
- excludeCardSize,
22
- canvasRef
23
- });
24
- useEffect(()=>{
25
- const canvas = canvasRef.current;
26
- if (!canvas) return;
27
- const engine = createSweepEngine(canvas, optionsRef.current);
28
- engineRef.current = engine;
29
- onEngineCreated(engine);
30
- const reduced = window.matchMedia('(prefers-reduced-motion: reduce)');
31
- reducedMotionRef.current = reduced;
32
- const apply = ()=>{
33
- if (reduced.matches || pausedRef.current) {
34
- engine.stop();
35
- engine.renderStatic();
36
- } else engine.start();
37
- };
38
- apply();
39
- reduced.addEventListener('change', apply);
40
- let frame = 0;
41
- const ro = new ResizeObserver(()=>{
42
- cancelAnimationFrame(frame);
43
- frame = requestAnimationFrame(()=>engine.resize());
44
- });
45
- ro.observe(canvas);
46
- const themeObserver = new MutationObserver(()=>engine.setOptions({}));
47
- themeObserver.observe(document.documentElement, {
48
- attributes: true,
49
- attributeFilter: [
50
- 'data-theme',
51
- 'class'
52
- ]
53
- });
54
- return ()=>{
55
- reduced.removeEventListener('change', apply);
56
- reducedMotionRef.current = null;
57
- ro.disconnect();
58
- themeObserver.disconnect();
59
- cancelAnimationFrame(frame);
60
- engine.stop();
61
- engineRef.current = null;
62
- onEngineDestroyed();
63
- };
64
- }, [
65
- onEngineCreated,
66
- onEngineDestroyed
67
- ]);
68
- const syncKey = `${JSON.stringify(options)}|${paused}`;
69
- useEffect(()=>{
70
- const engine = engineRef.current;
71
- if (!engine) return;
72
- engine.setOptions(optionsRef.current);
73
- const reduced = reducedMotionRef.current;
74
- if (reduced?.matches || pausedRef.current) {
75
- engine.stop();
76
- engine.renderStatic();
77
- } else engine.start();
78
- }, [
79
- syncKey
80
- ]);
81
- if (null == children) return /*#__PURE__*/ jsxs(Fragment, {
82
- children: [
83
- /*#__PURE__*/ jsx("canvas", {
84
- "data-slot": "animated-background",
85
- ...rest,
86
- ref: (node)=>{
87
- canvasRef.current = node;
88
- if ('function' == typeof ref) ref(node);
89
- else if (ref) ref.current = node;
90
- },
91
- "aria-hidden": "true",
92
- className: cn('h-full w-full pointer-events-none', gameActive && 'pointer-events-auto', className),
93
- onPointerDown: onPointerDown
94
- }),
95
- hudElement
96
- ]
97
- });
98
- return /*#__PURE__*/ jsxs("div", {
99
- "data-slot": "animated-background",
100
- ...rest,
101
- ref: ref,
102
- className: cn('relative h-full w-full', className),
103
- children: [
104
- /*#__PURE__*/ jsx("canvas", {
105
- ref: canvasRef,
106
- "aria-hidden": "true",
107
- className: cn('absolute inset-0 h-full w-full pointer-events-none', gameActive && 'pointer-events-auto'),
108
- onPointerDown: onPointerDown
109
- }),
110
- hudElement,
111
- /*#__PURE__*/ jsx("div", {
112
- className: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center",
113
- children: /*#__PURE__*/ jsx("div", {
114
- className: "pointer-events-auto",
115
- children: children
116
- })
117
- })
118
- ]
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { BlurBackground } from "./blur/index.js";
3
+ import { PixelBackground } from "./pixel/index.js";
4
+ const AnimatedBackground = ({ variant = 'pixel', ...rest })=>{
5
+ if ('blur' === variant) return /*#__PURE__*/ jsx(BlurBackground, {
6
+ ...rest
7
+ });
8
+ return /*#__PURE__*/ jsx(PixelBackground, {
9
+ ...rest
119
10
  });
120
11
  };
121
12
  AnimatedBackground.displayName = 'AnimatedBackground';
@@ -0,0 +1,6 @@
1
+ import type { FC, HTMLAttributes, ReactNode, Ref } from 'react';
2
+ export interface BlurBackgroundProps extends HTMLAttributes<HTMLDivElement> {
3
+ ref?: Ref<HTMLDivElement>;
4
+ children?: ReactNode;
5
+ }
6
+ export declare const BlurBackground: FC<BlurBackgroundProps>;
@@ -0,0 +1,129 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../../utils/cn.js";
3
+ const BLOBS = [
4
+ {
5
+ name: 'b1-lavender-top',
6
+ style: {
7
+ width: '66%',
8
+ height: '52%',
9
+ left: '-8%',
10
+ top: '-12%'
11
+ },
12
+ background: 'radial-gradient(circle at 50% 50%, #cdccda 0%, rgba(205,204,218,0) 68%)',
13
+ anim: 'lg-f1',
14
+ base: 37
15
+ },
16
+ {
17
+ name: 'b2-cream-right',
18
+ style: {
19
+ width: '56%',
20
+ height: '78%',
21
+ right: '-13%',
22
+ top: '6%'
23
+ },
24
+ background: 'radial-gradient(circle at 50% 50%, #f6dba6 0%, rgba(246,219,166,0) 66%)',
25
+ anim: 'lg-f2',
26
+ base: 29
27
+ },
28
+ {
29
+ name: 'b3-peach-halo',
30
+ style: {
31
+ width: '78%',
32
+ height: '64%',
33
+ left: '10%',
34
+ bottom: '-20%'
35
+ },
36
+ background: 'radial-gradient(circle at 50% 50%, #ffab70 0%, rgba(255,171,112,0) 68%)',
37
+ anim: 'lg-f4',
38
+ base: 31
39
+ },
40
+ {
41
+ name: 'b4-orange-core',
42
+ style: {
43
+ width: '60%',
44
+ height: '48%',
45
+ left: '22%',
46
+ bottom: '-10%'
47
+ },
48
+ background: 'radial-gradient(circle at 50% 50%, #ffb07e 0%, #ffc8a2 33%, rgba(255,200,162,0) 70%)',
49
+ anim: 'lg-f3',
50
+ base: 23
51
+ },
52
+ {
53
+ name: 'b5-cream-lower',
54
+ style: {
55
+ width: '60%',
56
+ height: '56%',
57
+ right: '-11%',
58
+ bottom: '0%'
59
+ },
60
+ background: 'radial-gradient(circle at 50% 50%, #f9e2b4 0%, rgba(249,226,180,0) 66%)',
61
+ anim: 'lg-f5',
62
+ base: 41
63
+ },
64
+ {
65
+ name: 'b6-offwhite-center',
66
+ style: {
67
+ width: '76%',
68
+ height: '62%',
69
+ left: '13%',
70
+ top: '24%'
71
+ },
72
+ background: 'radial-gradient(circle at 50% 50%, #f3eae0 0%, rgba(243,234,224,0) 70%)',
73
+ anim: 'lg-f6',
74
+ base: 43
75
+ }
76
+ ];
77
+ const BLUR = 90;
78
+ const SPEED = 2;
79
+ const BlurBackground = ({ ref, className, style, children, ...rest })=>{
80
+ const meshContent = /*#__PURE__*/ jsx("div", {
81
+ className: "lg-mesh",
82
+ style: {
83
+ '--lg-blur': BLUR
84
+ },
85
+ children: BLOBS.map((b)=>/*#__PURE__*/ jsx("div", {
86
+ className: "lg-blob",
87
+ style: {
88
+ ...b.style,
89
+ background: b.background,
90
+ animationName: b.anim,
91
+ animationDuration: `${b.base / SPEED}s`,
92
+ animationTimingFunction: 'ease-in-out',
93
+ animationIterationCount: 'infinite'
94
+ }
95
+ }, b.name))
96
+ });
97
+ if (null == children) return /*#__PURE__*/ jsx("div", {
98
+ "data-slot": "blur-background",
99
+ ...rest,
100
+ ref: ref,
101
+ className: cn('lg-frame', className),
102
+ style: style,
103
+ "aria-hidden": "true",
104
+ children: meshContent
105
+ });
106
+ return /*#__PURE__*/ jsxs("div", {
107
+ "data-slot": "blur-background",
108
+ ...rest,
109
+ ref: ref,
110
+ className: cn('lg-frame relative', className),
111
+ style: style,
112
+ children: [
113
+ /*#__PURE__*/ jsx("div", {
114
+ "aria-hidden": "true",
115
+ className: "absolute inset-0 pointer-events-none",
116
+ children: meshContent
117
+ }),
118
+ /*#__PURE__*/ jsx("div", {
119
+ className: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center",
120
+ children: /*#__PURE__*/ jsx("div", {
121
+ className: "pointer-events-auto",
122
+ children: children
123
+ })
124
+ })
125
+ ]
126
+ });
127
+ };
128
+ BlurBackground.displayName = 'BlurBackground';
129
+ export { BlurBackground };
@@ -0,0 +1 @@
1
+ export { BlurBackground, type BlurBackgroundProps } from './BlurBackground';
@@ -0,0 +1,2 @@
1
+ import { BlurBackground } from "./BlurBackground.js";
2
+ export { BlurBackground };
@@ -1,2 +1,3 @@
1
- export { AnimatedBackground } from './AnimatedBackground';
2
- export type { AnimatedBackgroundProps } from './module';
1
+ export { AnimatedBackground, type AnimatedBackgroundProps } from './AnimatedBackground';
2
+ export { BlurBackground, type BlurBackgroundProps } from './blur/BlurBackground';
3
+ export { PixelBackground, type PixelBackgroundProps } from './pixel/PixelBackground';
@@ -1,2 +1,4 @@
1
1
  import { AnimatedBackground } from "./AnimatedBackground.js";
2
- export { AnimatedBackground };
2
+ import { BlurBackground } from "./blur/BlurBackground.js";
3
+ import { PixelBackground } from "./pixel/PixelBackground.js";
4
+ export { AnimatedBackground, BlurBackground, PixelBackground };
@@ -1,5 +1,5 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { cn } from "../../utils/cn.js";
2
+ import { cn } from "../../../utils/cn.js";
3
3
  const GameHud = ({ caught, armed, roundOver, stats, accuracy, faced, catchKey, gateTarget, onTryAgain, soundOn })=>{
4
4
  const showCounter = caught > 0;
5
5
  return /*#__PURE__*/ jsxs(Fragment, {
@@ -0,0 +1,11 @@
1
+ import type { FC, HTMLAttributes, ReactNode, Ref } from 'react';
2
+ export interface PixelBackgroundProps extends HTMLAttributes<HTMLDivElement> {
3
+ ref?: Ref<HTMLDivElement>;
4
+ children?: ReactNode;
5
+ game?: boolean;
6
+ excludeCardSize?: {
7
+ width: number;
8
+ height: number;
9
+ };
10
+ }
11
+ export declare const PixelBackground: FC<PixelBackgroundProps>;
@@ -0,0 +1,102 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from "react";
3
+ import { cn } from "../../../utils/cn.js";
4
+ import { createSweepEngine, resolveOptions, useGame } from "./module/index.js";
5
+ const ENGINE_OPTIONS = resolveOptions();
6
+ const PixelBackground = (props)=>{
7
+ const { ref, game = false, excludeCardSize, className, children, ...rest } = props;
8
+ const canvasRef = useRef(null);
9
+ const engineRef = useRef(null);
10
+ const reducedMotionRef = useRef(null);
11
+ const { gameActive, onPointerDown, hudElement, onEngineCreated, onEngineDestroyed } = useGame({
12
+ game,
13
+ isHalftone: true,
14
+ excludeCardSize,
15
+ canvasRef
16
+ });
17
+ useEffect(()=>{
18
+ const canvas = canvasRef.current;
19
+ if (!canvas) return;
20
+ const engine = createSweepEngine(canvas, ENGINE_OPTIONS);
21
+ engineRef.current = engine;
22
+ onEngineCreated(engine);
23
+ const reduced = window.matchMedia('(prefers-reduced-motion: reduce)');
24
+ reducedMotionRef.current = reduced;
25
+ const apply = ()=>{
26
+ if (reduced.matches) {
27
+ engine.stop();
28
+ engine.renderStatic();
29
+ } else engine.start();
30
+ };
31
+ apply();
32
+ reduced.addEventListener('change', apply);
33
+ let frame = 0;
34
+ const ro = new ResizeObserver(()=>{
35
+ cancelAnimationFrame(frame);
36
+ frame = requestAnimationFrame(()=>engine.resize());
37
+ });
38
+ ro.observe(canvas);
39
+ const themeObserver = new MutationObserver(()=>engine.setOptions({}));
40
+ themeObserver.observe(document.documentElement, {
41
+ attributes: true,
42
+ attributeFilter: [
43
+ 'data-theme',
44
+ 'class'
45
+ ]
46
+ });
47
+ return ()=>{
48
+ reduced.removeEventListener('change', apply);
49
+ reducedMotionRef.current = null;
50
+ ro.disconnect();
51
+ themeObserver.disconnect();
52
+ cancelAnimationFrame(frame);
53
+ engine.stop();
54
+ engineRef.current = null;
55
+ onEngineDestroyed();
56
+ };
57
+ }, [
58
+ onEngineCreated,
59
+ onEngineDestroyed
60
+ ]);
61
+ if (null == children) return /*#__PURE__*/ jsxs(Fragment, {
62
+ children: [
63
+ /*#__PURE__*/ jsx("canvas", {
64
+ "data-slot": "pixel-background",
65
+ ...rest,
66
+ ref: (node)=>{
67
+ canvasRef.current = node;
68
+ if ('function' == typeof ref) ref(node);
69
+ else if (ref) ref.current = node;
70
+ },
71
+ "aria-hidden": "true",
72
+ className: cn('h-full w-full pointer-events-none', gameActive && 'pointer-events-auto', className),
73
+ onPointerDown: onPointerDown
74
+ }),
75
+ hudElement
76
+ ]
77
+ });
78
+ return /*#__PURE__*/ jsxs("div", {
79
+ "data-slot": "pixel-background",
80
+ ...rest,
81
+ ref: ref,
82
+ className: cn('relative h-full w-full', className),
83
+ children: [
84
+ /*#__PURE__*/ jsx("canvas", {
85
+ ref: canvasRef,
86
+ "aria-hidden": "true",
87
+ className: cn('absolute inset-0 h-full w-full pointer-events-none', gameActive && 'pointer-events-auto'),
88
+ onPointerDown: onPointerDown
89
+ }),
90
+ hudElement,
91
+ /*#__PURE__*/ jsx("div", {
92
+ className: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center",
93
+ children: /*#__PURE__*/ jsx("div", {
94
+ className: "pointer-events-auto",
95
+ children: children
96
+ })
97
+ })
98
+ ]
99
+ });
100
+ };
101
+ PixelBackground.displayName = 'PixelBackground';
102
+ export { PixelBackground };
@@ -0,0 +1 @@
1
+ export { PixelBackground, type PixelBackgroundProps } from './PixelBackground';
@@ -0,0 +1,2 @@
1
+ import { PixelBackground } from "./PixelBackground.js";
2
+ export { PixelBackground };
@@ -59,7 +59,7 @@ function createGameLogic(host) {
59
59
  let roundSpawned = 0;
60
60
  let roundDone = false;
61
61
  let lastSpawn = -1 / 0;
62
- let soundOn = false;
62
+ let soundOn = true;
63
63
  let plugins = {};
64
64
  let statsCb = null;
65
65
  let exclusionBox = null;
@@ -1,5 +1,5 @@
1
1
  export { createSweepEngine, type SweepEngine } from './engine';
2
2
  export { resolveOptions } from './lib';
3
- export type { AnimatedBackgroundProps, EngineOptions, GameStats, Texture } from './types';
3
+ export type { EngineOptions, GameStats } from './types';
4
4
  export { useGame } from './useGame';
5
5
  export { useGameKeyboard } from './useGameKeyboard';
@@ -0,0 +1,2 @@
1
+ import type { EngineOptions } from './types';
2
+ export declare const resolveOptions: () => EngineOptions;
@@ -0,0 +1,16 @@
1
+ const resolveOptions = ()=>({
2
+ texture: 'halftone',
3
+ spacing: 16,
4
+ sweepPeriod: 12.5,
5
+ bloomRadius: 80,
6
+ anomalyInterval: 1.4,
7
+ intensity: 0.9,
8
+ bloomAlpha: 0.2,
9
+ maxDotSize: 20,
10
+ tilt: 16,
11
+ dotColorVar: '--animated-bg-dot',
12
+ accentColorVar: '--animated-bg-accent-dot',
13
+ baseColorVar: '--color-component-app-shell-bg',
14
+ caughtColorVar: '--animated-bg-caught-dot'
15
+ });
16
+ export { resolveOptions };
@@ -0,0 +1,38 @@
1
+ export type Texture = 'clean' | 'halftone';
2
+ export interface EngineOptions {
3
+ texture: Texture;
4
+ /** Grid cell size in px. */
5
+ spacing: number;
6
+ /** Seconds for one L→R sweep pass. */
7
+ sweepPeriod: number;
8
+ /** How far from the scan line (px) dots react. */
9
+ bloomRadius: number;
10
+ /** Minimum seconds between accent events. */
11
+ anomalyInterval: number;
12
+ /** Global opacity multiplier (0–1). */
13
+ intensity: number;
14
+ /** Peak alpha of bloomed dots before `intensity`. */
15
+ bloomAlpha: number;
16
+ /** Halftone only: cap on a bloomed pixel's edge length (px). */
17
+ maxDotSize: number;
18
+ /** Sweep-line tilt in degrees (0 = vertical). */
19
+ tilt: number;
20
+ /** CSS custom-property names resolved at runtime. */
21
+ dotColorVar: string;
22
+ accentColorVar: string;
23
+ baseColorVar: string;
24
+ /** CSS custom-property name for the "caught" (neutralised) color. */
25
+ caughtColorVar: string;
26
+ }
27
+ export interface GameStats {
28
+ /** Lifetime catches — drives the arming gate (≥ 5); reset only by exitGame. */
29
+ kills: number;
30
+ /** Threats stopped THIS round (HIT numerator). */
31
+ stopped: number;
32
+ /** Threats that timed out unshot THIS round. */
33
+ escaped: number;
34
+ /** Attacks spawned this round (caps at ROUND_ATTACKS). */
35
+ spawned: number;
36
+ /** Round complete — full wave spawned AND field cleared. */
37
+ done: boolean;
38
+ }
@@ -1,6 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useCallback } from "react";
2
+ import { useCallback, useState } from "react";
3
3
  import { DatePicker } from "@ark-ui/react";
4
+ import { CalendarDateTime } from "@internationalized/date";
4
5
  import { cn } from "../../utils/cn.js";
5
6
  import { DateInput } from "../DateInput/index.js";
6
7
  import { useCalendarContext } from "./CalendarContext.js";
@@ -12,7 +13,16 @@ const toArkDateValue = (date)=>{
12
13
  if (!date) return;
13
14
  return date;
14
15
  };
15
- const SingleDateInputInner = ({ api, readonly })=>{
16
+ const withTime = (value, time)=>{
17
+ if (!value) return null;
18
+ if ('hour' in value) return value;
19
+ return new CalendarDateTime(value.year, value.month, value.day, time.hour, time.minute);
20
+ };
21
+ const SingleDateInputInner = ({ api, readonly, showTime })=>{
22
+ const [time, setTime] = useState({
23
+ hour: 0,
24
+ minute: 0
25
+ });
16
26
  const handleChange = useCallback((newValue)=>{
17
27
  const arkValue = toArkDateValue(newValue);
18
28
  if (arkValue) api.setValue([
@@ -22,11 +32,26 @@ const SingleDateInputInner = ({ api, readonly })=>{
22
32
  }, [
23
33
  api
24
34
  ]);
35
+ const handleDateTimeChange = useCallback((newValue)=>{
36
+ if (newValue && 'hour' in newValue) setTime({
37
+ hour: newValue.hour,
38
+ minute: newValue.minute
39
+ });
40
+ handleChange(newValue);
41
+ }, [
42
+ handleChange
43
+ ]);
25
44
  const inputValue = toReactAriaDateValue(api.value[0]);
26
45
  return /*#__PURE__*/ jsx("div", {
27
46
  className: "flex flex-1",
28
47
  onKeyDown: (e)=>e.stopPropagation(),
29
- children: /*#__PURE__*/ jsx(DateInput, {
48
+ children: showTime ? /*#__PURE__*/ jsx(DateInput, {
49
+ value: withTime(inputValue, time),
50
+ onChange: handleDateTimeChange,
51
+ readOnly: readonly,
52
+ granularity: "minute",
53
+ showTimeDropdown: true
54
+ }) : /*#__PURE__*/ jsx(DateInput, {
30
55
  value: inputValue,
31
56
  onChange: handleChange,
32
57
  readOnly: readonly,
@@ -96,7 +121,7 @@ const RangeDateInputInner = ({ api, readonly })=>{
96
121
  });
97
122
  };
98
123
  const CalendarInputHeader = ({ className })=>{
99
- const { isRange, readonly } = useCalendarContext();
124
+ const { isRange, readonly, showTime } = useCalendarContext();
100
125
  return /*#__PURE__*/ jsx("div", {
101
126
  className: cn('flex flex-1 items-center', 'pt-20 pb-4 px-20', className),
102
127
  children: /*#__PURE__*/ jsx(DatePicker.Context, {
@@ -105,7 +130,8 @@ const CalendarInputHeader = ({ className })=>{
105
130
  readonly: readonly
106
131
  }) : /*#__PURE__*/ jsx(SingleDateInputInner, {
107
132
  api: api,
108
- readonly: readonly
133
+ readonly: readonly,
134
+ showTime: showTime
109
135
  })
110
136
  })
111
137
  });
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { cn } from "../../utils/cn.js";
4
4
  import { TestIdProvider } from "../../utils/testId.js";
5
- const inputGroupVariants = cva(cn('group/input-group', 'w-full flex items-center border rounded-8 bg-component-input-bg relative', 'has-[>textarea]:h-auto', '**:data-[slot=input]:flex-1', '**:data-[slot=input]:rounded-none', '**:data-[slot=input]:border-0', '**:data-[slot=input]:bg-transparent', '**:data-[slot=input]:shadow-none', '**:data-[slot=input]:focus-visible:ring-0', '**:data-[slot=input]:focus-within:ring-0', 'border border-border-primary outline-none shadow-xs transition-[color,border,box-shadow]', 'has-[[data-slot=input]:not(:disabled):not([aria-disabled=true]):not([data-readonly=true]):not(:focus-visible)]:hover:border-component-border-input-hover', 'focus-visible:ring-focus-primary', 'has-[[data-slot=input]:not([data-readonly=true]):focus-visible]:ring-3', 'has-[[data-slot=input]:not([data-readonly=true]):focus-visible]:ring-focus-primary', 'has-[[data-slot=input]:not([data-readonly=true]):focus-visible]:border-border-strong-primary', 'focus-within:ring-focus-primary', 'has-[[data-slot=input]:not([data-readonly=true]):focus-within]:ring-3', 'has-[[data-slot=input]:not([data-readonly=true]):focus-within]:ring-focus-primary', 'has-[[data-slot=input]:not([data-readonly=true]):focus-within]:border-border-strong-primary', 'has-[[data-slot][aria-invalid=true]]:border-border-strong-danger', 'has-[[data-slot][aria-invalid=true]]:ring-focus-destructive', 'has-[[data-slot][aria-invalid=true]:not(:disabled):not([aria-disabled=true]):not([data-readonly=true])]:hover:border-border-strong-danger', 'has-[[data-slot][aria-invalid=true]:not(:disabled):not([aria-disabled=true]):not([data-readonly=true])]:hover:ring-3', 'has-[[data-slot][aria-invalid=true]:not(:disabled):not([aria-disabled=true]):not([data-readonly=true])]:hover:ring-focus-destructive-hover', 'has-[[data-slot][aria-invalid=true]:not(:disabled):not([aria-disabled=true]):not([data-readonly=true])]:*:data-[slot=input]:hover:ring-0', 'has-[[data-slot=input]:disabled]:opacity-50', 'has-[[data-slot=input][aria-disabled=true]]:opacity-50', 'has-[[data-slot=input]:disabled]:cursor-not-allowed', 'has-[[data-slot=input][aria-disabled=true]]:cursor-not-allowed'), {
5
+ const inputGroupVariants = cva(cn('group/input-group', 'w-full flex items-center border rounded-8 bg-component-input-bg relative', '**:data-[slot=input]:flex-1', '**:data-[slot=input]:rounded-none', '**:data-[slot=input]:border-0', '**:data-[slot=input]:bg-transparent', '**:data-[slot=input]:shadow-none', '**:data-[slot=input]:focus-visible:ring-0', '**:data-[slot=input]:focus-within:ring-0', 'has-[textarea]:flex-col', 'has-[textarea]:h-auto', 'has-[textarea]:items-stretch', '[&_textarea]:border-0', '[&_textarea]:bg-transparent', '[&_textarea]:shadow-none', '[&_textarea]:rounded-none', '[&_textarea]:ring-0', '[&_textarea:focus-visible]:ring-0', '[&_textarea]:outline-none', '**:data-[slot=textarea]:flex-1', '**:data-[slot=textarea]:w-full', 'border border-border-primary outline-none shadow-xs transition-[color,border,box-shadow]', 'has-[[data-slot=input]:not(:disabled):not([aria-disabled=true]):not([data-readonly=true]):not(:focus-visible)]:hover:border-component-border-input-hover', 'focus-visible:ring-focus-primary', 'has-[[data-slot=input]:not([data-readonly=true]):focus-visible]:ring-3', 'has-[[data-slot=input]:not([data-readonly=true]):focus-visible]:ring-focus-primary', 'has-[[data-slot=input]:not([data-readonly=true]):focus-visible]:border-border-strong-primary', 'focus-within:ring-focus-primary', 'has-[[data-slot=input]:not([data-readonly=true]):focus-within]:ring-3', 'has-[[data-slot=input]:not([data-readonly=true]):focus-within]:ring-focus-primary', 'has-[[data-slot=input]:not([data-readonly=true]):focus-within]:border-border-strong-primary', 'has-[textarea:not(:disabled):focus-visible]:ring-3', 'has-[textarea:not(:disabled):focus-visible]:ring-focus-primary', 'has-[textarea:not(:disabled):focus-visible]:border-border-strong-primary', 'has-[[data-slot][aria-invalid=true]]:border-border-strong-danger', 'has-[[data-slot][aria-invalid=true]]:ring-focus-destructive', 'has-[[data-slot][aria-invalid=true]:not(:disabled):not([aria-disabled=true]):not([data-readonly=true])]:hover:border-border-strong-danger', 'has-[[data-slot][aria-invalid=true]:not(:disabled):not([aria-disabled=true]):not([data-readonly=true])]:hover:ring-3', 'has-[[data-slot][aria-invalid=true]:not(:disabled):not([aria-disabled=true]):not([data-readonly=true])]:hover:ring-focus-destructive-hover', 'has-[[data-slot][aria-invalid=true]:not(:disabled):not([aria-disabled=true]):not([data-readonly=true])]:*:data-[slot=input]:hover:ring-0', 'has-[textarea[aria-invalid=true]]:border-border-strong-danger', 'has-[textarea[aria-invalid=true]:not(:disabled)]:hover:ring-3', 'has-[textarea[aria-invalid=true]:not(:disabled)]:hover:ring-focus-destructive-hover', 'has-[textarea:not(:disabled):focus-visible]:has-[textarea[aria-invalid=true]]:ring-focus-destructive', 'has-[[data-slot=input]:disabled]:opacity-50', 'has-[[data-slot=input][aria-disabled=true]]:opacity-50', 'has-[[data-slot=input]:disabled]:cursor-not-allowed', 'has-[[data-slot=input][aria-disabled=true]]:cursor-not-allowed', 'has-[textarea:disabled]:opacity-50', 'has-[textarea:disabled]:cursor-not-allowed'), {
6
6
  variants: {
7
7
  size: {
8
8
  default: 'h-36',
@@ -1,7 +1,7 @@
1
1
  import type { ComponentProps, FC } from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const inputGroupAddonVariants: (props?: ({
4
- align?: "inline-end" | "inline-start" | null | undefined;
4
+ align?: "inline-end" | "inline-start" | "block-end" | null | undefined;
5
5
  variant?: "outline" | "ghost" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export declare const InputGroupAddon: FC<ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>>;
@@ -17,7 +17,8 @@ const inputGroupAddonVariants = cva(cn([
17
17
  variants: {
18
18
  align: {
19
19
  'inline-start': 'order-first pl-12 has-[>kbd]:pl-8',
20
- 'inline-end': 'order-last pr-12 has-[>kbd]:pr-8'
20
+ 'inline-end': 'order-last pr-12 has-[>kbd]:pr-8',
21
+ 'block-end': 'order-last w-full px-8 pb-8 h-auto justify-start'
21
22
  },
22
23
  variant: {
23
24
  outline: 'px-12 bg-states-primary-default-alt border-border-primary',
@@ -54,7 +55,7 @@ const InputGroupAddon = ({ align = 'inline-start', variant = 'ghost', ...props }
54
55
  const testId = useTestId('addon');
55
56
  const handleClick = (event)=>{
56
57
  if (event.target.closest('button')) return;
57
- event.currentTarget.parentElement?.querySelector('input')?.focus();
58
+ event.currentTarget.parentElement?.querySelector('input, textarea')?.focus();
58
59
  };
59
60
  return /*#__PURE__*/ jsx("div", {
60
61
  ...props,
@@ -9,4 +9,12 @@ interface NavPanelInternalContextValue {
9
9
  }
10
10
  export declare const NavPanelInternalProvider: import("react").Provider<NavPanelInternalContextValue | null>;
11
11
  export declare function useNavPanelInternalContext(): NavPanelInternalContextValue;
12
- export {};
12
+ declare const NAV_PANEL_BASE_PADDING = 8;
13
+ interface NavPanelDepthContextValue {
14
+ depth: number;
15
+ indent: number;
16
+ }
17
+ export declare const NavPanelDepthProvider: import("react").Provider<NavPanelDepthContextValue>;
18
+ export declare function useNavPanelDepth(): number;
19
+ export declare function useNavPanelIndent(): number;
20
+ export { NAV_PANEL_BASE_PADDING };