create-asciitorium 0.1.32 → 0.1.34

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.
@@ -4,8 +4,10 @@ import {
4
4
  Select,
5
5
  Switch,
6
6
  Row,
7
- PersistentState,
8
7
  Text,
8
+ PerfMonitor,
9
+ State,
10
+ Keybind,
9
11
  } from 'asciitorium';
10
12
 
11
13
  import {
@@ -14,6 +16,7 @@ import {
14
16
  FormExample,
15
17
  MultiSelectExample,
16
18
  LayoutSizingExample,
19
+ ModalExample,
17
20
  TabsExample,
18
21
  ArtExample,
19
22
  SlidersExample,
@@ -22,7 +25,10 @@ import {
22
25
  } from 'asciitorium/examples';
23
26
 
24
27
  // Main state for component selection with persistence
25
- const selectedComponent = new PersistentState('Art', 'demo-selected-component');
28
+ const selectedComponent = new State('Art');
29
+
30
+ // State for PerfMonitor visibility (P toggle)
31
+ const showPerfMonitor = new State(false);
26
32
 
27
33
  // Component list for navigation
28
34
  const componentList = [
@@ -30,6 +36,7 @@ const componentList = [
30
36
  'Button',
31
37
  'CelticBorder',
32
38
  'Form',
39
+ 'Modal',
33
40
  'Maze',
34
41
  'MultiSelect',
35
42
  'LayoutSizing',
@@ -44,6 +51,7 @@ const examples = {
44
51
  Button: ButtonExample,
45
52
  CelticBorder: CelticBorderExample,
46
53
  Form: FormExample,
54
+ Modal: ModalExample,
47
55
  Maze: MazeExample,
48
56
  MultiSelect: MultiSelectExample,
49
57
  LayoutSizing: LayoutSizingExample,
@@ -52,8 +60,15 @@ const examples = {
52
60
  Tabs: TabsExample,
53
61
  };
54
62
 
63
+ // toggle PerfMonitor with "P" key
64
+ const togglePerfMonitor = () => {
65
+ showPerfMonitor.value = !showPerfMonitor.value;
66
+ };
67
+
55
68
  const app = (
56
69
  <App>
70
+ <Keybind keyBinding="p" action={togglePerfMonitor} global />
71
+
57
72
  <Art
58
73
  src={'./art/asciitorium.txt'}
59
74
  style={{ align: 'center', gap: { bottom: 2 } }}
@@ -78,9 +93,10 @@ const app = (
78
93
  />
79
94
  </Row>
80
95
  <Text
81
- content="Navigation: ↑↓ or W/S to browse • [Space]/[Enter] to select • [Tab] to switch focus"
82
- style={{ align: 'center', gap: { top: 1 } }}
96
+ content="Navigation: ↑↓ • [Space]/[Enter] to select • [Tab]/[Tab+Shift] to switch focus • [P] toggles performance monitor"
97
+ style={{ align: 'center', gap: 1 }}
83
98
  />
99
+ <PerfMonitor visible={showPerfMonitor} />
84
100
  </App>
85
101
  );
86
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-asciitorium",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "private": false,
5
5
  "description": "Scaffold a Vite + TypeScript project prewired for asciitorium (web + cli).",
6
6
  "bin": {