@deadragdoll/reactnu 0.1.9

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 (176) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +151 -0
  3. package/dist/appHost/NuAppHostProvider.d.ts +6 -0
  4. package/dist/appHost/appHostContext.d.ts +26 -0
  5. package/dist/components/Button/Button.d.ts +13 -0
  6. package/dist/components/Button/index.d.ts +1 -0
  7. package/dist/components/CheckBox/CheckBox.d.ts +14 -0
  8. package/dist/components/CheckBox/index.d.ts +1 -0
  9. package/dist/components/ComboBox/ComboBox.d.ts +23 -0
  10. package/dist/components/ComboBox/index.d.ts +1 -0
  11. package/dist/components/CommandButton/CommandButton.d.ts +17 -0
  12. package/dist/components/CommandButton/index.d.ts +1 -0
  13. package/dist/components/CrtGlitch/CrtGlitch.d.ts +23 -0
  14. package/dist/components/CrtGlitch/index.d.ts +1 -0
  15. package/dist/components/Dashboard/Dashboard.d.ts +25 -0
  16. package/dist/components/Dashboard/index.d.ts +1 -0
  17. package/dist/components/Desktop/Desktop.d.ts +6 -0
  18. package/dist/components/Desktop/index.d.ts +1 -0
  19. package/dist/components/Dropdown/Dropdown.d.ts +19 -0
  20. package/dist/components/Dropdown/index.d.ts +1 -0
  21. package/dist/components/Frame/Frame.d.ts +24 -0
  22. package/dist/components/Frame/index.d.ts +1 -0
  23. package/dist/components/Glyph/NuGlyph.d.ts +6 -0
  24. package/dist/components/Glyph/index.d.ts +1 -0
  25. package/dist/components/Info/Info.d.ts +13 -0
  26. package/dist/components/Info/index.d.ts +1 -0
  27. package/dist/components/ListBox/ListBox.d.ts +23 -0
  28. package/dist/components/ListBox/index.d.ts +1 -0
  29. package/dist/components/ListBox/internals/ListBoxCategoryView.d.ts +6 -0
  30. package/dist/components/ListBox/internals/ListBoxCheckControl.d.ts +8 -0
  31. package/dist/components/ListBox/internals/ListBoxGroupView.d.ts +17 -0
  32. package/dist/components/ListBox/internals/ListBoxItemView.d.ts +18 -0
  33. package/dist/components/ListBox/internals/helpers.d.ts +5 -0
  34. package/dist/components/ListBox/internals/renderLabel.d.ts +2 -0
  35. package/dist/components/ListBox/internals/types.d.ts +27 -0
  36. package/dist/components/ListView/ListView.d.ts +27 -0
  37. package/dist/components/ListView/index.d.ts +1 -0
  38. package/dist/components/ListView/internals/ListViewCheckControl.d.ts +8 -0
  39. package/dist/components/ListView/internals/ListViewRow.d.ts +18 -0
  40. package/dist/components/ListView/internals/helpers.d.ts +5 -0
  41. package/dist/components/ListView/internals/types.d.ts +17 -0
  42. package/dist/components/MainMenu/MainMenu.d.ts +8 -0
  43. package/dist/components/MainMenu/MainMenu.types.d.ts +23 -0
  44. package/dist/components/MainMenu/index.d.ts +3 -0
  45. package/dist/components/MainMenu/internals/MainMenuList.d.ts +12 -0
  46. package/dist/components/MainMenu/menuState.d.ts +40 -0
  47. package/dist/components/MaskedField/MaskedField.d.ts +13 -0
  48. package/dist/components/MaskedField/index.d.ts +2 -0
  49. package/dist/components/MaskedField/textMask.d.ts +8 -0
  50. package/dist/components/Memo/Memo.d.ts +14 -0
  51. package/dist/components/Memo/index.d.ts +1 -0
  52. package/dist/components/PageControl/PageControl.d.ts +20 -0
  53. package/dist/components/PageControl/index.d.ts +1 -0
  54. package/dist/components/Panel/Panel.d.ts +11 -0
  55. package/dist/components/Panel/index.d.ts +1 -0
  56. package/dist/components/PopupMenu/PopupMenu.d.ts +22 -0
  57. package/dist/components/PopupMenu/index.d.ts +2 -0
  58. package/dist/components/PopupMenu/usePopupMenu.d.ts +12 -0
  59. package/dist/components/ProgressBar/ProgressBar.d.ts +17 -0
  60. package/dist/components/ProgressBar/index.d.ts +1 -0
  61. package/dist/components/PropertyGrid/PropertyGrid.d.ts +38 -0
  62. package/dist/components/PropertyGrid/index.d.ts +1 -0
  63. package/dist/components/RadioGroup/RadioButton.d.ts +9 -0
  64. package/dist/components/RadioGroup/RadioGroup.d.ts +21 -0
  65. package/dist/components/RadioGroup/index.d.ts +2 -0
  66. package/dist/components/ReportCell/ReportCell.d.ts +6 -0
  67. package/dist/components/ReportCell/index.d.ts +1 -0
  68. package/dist/components/SearchBox/SearchBox.d.ts +23 -0
  69. package/dist/components/SearchBox/index.d.ts +1 -0
  70. package/dist/components/SpinBox/SpinBox.d.ts +16 -0
  71. package/dist/components/SpinBox/index.d.ts +1 -0
  72. package/dist/components/Splitter/Splitter.d.ts +15 -0
  73. package/dist/components/Splitter/index.d.ts +1 -0
  74. package/dist/components/Stack/Stack.d.ts +13 -0
  75. package/dist/components/Stack/index.d.ts +1 -0
  76. package/dist/components/TextField/TextField.d.ts +12 -0
  77. package/dist/components/TextField/index.d.ts +1 -0
  78. package/dist/components/TickBar/TickBar.d.ts +22 -0
  79. package/dist/components/TickBar/index.d.ts +1 -0
  80. package/dist/components/ToolBar/ToolBar.d.ts +25 -0
  81. package/dist/components/ToolBar/index.d.ts +1 -0
  82. package/dist/components/TreeListView/TreeListView.d.ts +33 -0
  83. package/dist/components/TreeListView/index.d.ts +1 -0
  84. package/dist/components/TreeListView/internals/TreeListViewRow.d.ts +28 -0
  85. package/dist/components/TreeListView/internals/helpers.d.ts +14 -0
  86. package/dist/components/TreeListView/internals/types.d.ts +32 -0
  87. package/dist/components/TreeView/TreeView.d.ts +26 -0
  88. package/dist/components/TreeView/index.d.ts +1 -0
  89. package/dist/components/TreeView/internals/TreeViewItem.d.ts +21 -0
  90. package/dist/components/TreeView/internals/helpers.d.ts +5 -0
  91. package/dist/components/TreeView/internals/types.d.ts +10 -0
  92. package/dist/components/View/NuView.d.ts +10 -0
  93. package/dist/components/View/index.d.ts +1 -0
  94. package/dist/components/Window/StatusBarItem.d.ts +7 -0
  95. package/dist/components/Window/Window.d.ts +41 -0
  96. package/dist/components/Window/WindowTitleButton.d.ts +17 -0
  97. package/dist/components/Window/index.d.ts +5 -0
  98. package/dist/components/Window/internals/WindowStatusBar.d.ts +8 -0
  99. package/dist/components/Window/internals/WindowTitleBar.d.ts +10 -0
  100. package/dist/components/Window/useWindowTitleButtons.d.ts +12 -0
  101. package/dist/components/Window/windowMenuContext.d.ts +3 -0
  102. package/dist/components/_shared/ControlOpener.d.ts +18 -0
  103. package/dist/components/_shared/portalPositioning.d.ts +16 -0
  104. package/dist/components/_shared/slotProps.d.ts +867 -0
  105. package/dist/components/_shared/themePortal.d.ts +2 -0
  106. package/dist/components/_shared/treeData.d.ts +19 -0
  107. package/dist/components/_shared/usePopupPosition.d.ts +40 -0
  108. package/dist/index.cjs +9848 -0
  109. package/dist/index.d.ts +45 -0
  110. package/dist/index.js +9885 -0
  111. package/dist/styles.css +3644 -0
  112. package/dist/theme/NuThemeProvider.d.ts +26 -0
  113. package/dist/theme/themeContext.d.ts +15 -0
  114. package/dist/theme/themes.d.ts +49 -0
  115. package/dist/utils/renderMnemonicText.d.ts +10 -0
  116. package/dist/windowing/AppBarHost.d.ts +6 -0
  117. package/dist/windowing/AppBarItem.d.ts +587 -0
  118. package/dist/windowing/NuWindowProvider.d.ts +9 -0
  119. package/dist/windowing/WindowBar.d.ts +13 -0
  120. package/dist/windowing/dialogHelpers.d.ts +1793 -0
  121. package/dist/windowing/internals/MdiWindowPickerDialog.d.ts +10 -0
  122. package/dist/windowing/mdiMenu.d.ts +3 -0
  123. package/dist/windowing/windowContext.d.ts +18 -0
  124. package/dist/windowing/windowing.constants.d.ts +1 -0
  125. package/dist/windowing/windowing.types.d.ts +54 -0
  126. package/docs/API_REFERENCE.md +150 -0
  127. package/docs/ARCHITECTURE.md +170 -0
  128. package/docs/AppBarHost.md +22 -0
  129. package/docs/AppBarItem.md +22 -0
  130. package/docs/Button.md +24 -0
  131. package/docs/COMPONENT_INDEX.md +64 -0
  132. package/docs/CONTRIBUTOR_GUIDE.md +393 -0
  133. package/docs/CheckBox.md +30 -0
  134. package/docs/ComboBox.md +41 -0
  135. package/docs/CommandButton.md +45 -0
  136. package/docs/CrtGlitch.md +49 -0
  137. package/docs/Dashboard.md +73 -0
  138. package/docs/Desktop.md +27 -0
  139. package/docs/DialogHelpers.md +85 -0
  140. package/docs/Dropdown.md +44 -0
  141. package/docs/Frame.md +38 -0
  142. package/docs/GETTING_STARTED.md +110 -0
  143. package/docs/Glyph.md +29 -0
  144. package/docs/Info.md +51 -0
  145. package/docs/ListBox.md +35 -0
  146. package/docs/ListView.md +62 -0
  147. package/docs/MainMenu.md +36 -0
  148. package/docs/MaskedField.md +124 -0
  149. package/docs/Memo.md +32 -0
  150. package/docs/NuAppHostProvider.md +28 -0
  151. package/docs/NuThemeProvider.md +64 -0
  152. package/docs/NuView.md +58 -0
  153. package/docs/NuWindowProvider.md +81 -0
  154. package/docs/PageControl.md +28 -0
  155. package/docs/Panel.md +23 -0
  156. package/docs/PopupMenu.md +42 -0
  157. package/docs/ProgressBar.md +33 -0
  158. package/docs/PropertyGrid.md +63 -0
  159. package/docs/RadioGroup.md +36 -0
  160. package/docs/ReportCell.md +27 -0
  161. package/docs/SLOT_CUSTOMIZATION.md +85 -0
  162. package/docs/STORYBOOK.md +96 -0
  163. package/docs/SearchBox.md +41 -0
  164. package/docs/SpinBox.md +25 -0
  165. package/docs/Splitter.md +91 -0
  166. package/docs/Stack.md +26 -0
  167. package/docs/StatusBarItem.md +31 -0
  168. package/docs/TOKEN_CHECKLIST.md +122 -0
  169. package/docs/TextField.md +27 -0
  170. package/docs/TickBar.md +57 -0
  171. package/docs/ToolBar.md +51 -0
  172. package/docs/TreeListView.md +84 -0
  173. package/docs/TreeView.md +53 -0
  174. package/docs/Window.md +53 -0
  175. package/docs/WindowBar.md +24 -0
  176. package/package.json +47 -0
@@ -0,0 +1,10 @@
1
+ import { NuManagedWindowInfo } from "../windowing.types";
2
+ type MdiWindowPickerDialogProps = {
3
+ activeWindowId?: string;
4
+ domain?: string;
5
+ onActivateWindow: (id: string) => void;
6
+ onClose: () => void;
7
+ windows: NuManagedWindowInfo[];
8
+ };
9
+ export declare function MdiWindowPickerDialog({ activeWindowId, domain, onActivateWindow, onClose, windows }: MdiWindowPickerDialogProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,3 @@
1
+ import { MainMenuNode } from "../components/MainMenu/MainMenu.types";
2
+ import { NuMdiMenuBridge } from "./windowContext";
3
+ export declare function resolveMdiMainMenuItems(items: MainMenuNode[], bridge: NuMdiMenuBridge | null): MainMenuNode[];
@@ -0,0 +1,18 @@
1
+ import { NuInputBoxOptions, NuManagedWindowDefinition, NuManagedWindowInfo, NuMessageBoxOptions, NuMessageBoxResult } from "./windowing.types";
2
+ export type NuWindowContextValue = {
3
+ activateWindow: (id: string) => void;
4
+ bringToFront: (id: string) => void;
5
+ closeAll: () => void;
6
+ closeWindow: (id: string) => void;
7
+ openDialog: (definition: NuManagedWindowDefinition) => string;
8
+ openWindow: (definition: NuManagedWindowDefinition) => string;
9
+ showInputBox: (options: NuInputBoxOptions) => Promise<string | null>;
10
+ showMessageBox: (options: NuMessageBoxOptions) => Promise<NuMessageBoxResult>;
11
+ toggleWindowMaximized: (id: string) => void;
12
+ toggleWindowMinimized: (id: string) => void;
13
+ updateWindow: (id: string, patch: Partial<NuManagedWindowDefinition>) => void;
14
+ windows: NuManagedWindowInfo[];
15
+ };
16
+ export type NuMdiMenuBridge = Pick<NuWindowContextValue, "activateWindow" | "openDialog" | "windows">;
17
+ export declare const NuWindowContext: import("react").Context<NuWindowContextValue | null>;
18
+ export declare function useNuWindowManager(): NuWindowContextValue;
@@ -0,0 +1 @@
1
+ export declare const NU_APP_BAR_HEIGHT = "2.1rem";
@@ -0,0 +1,54 @@
1
+ import { CSSProperties, ReactNode } from "react";
2
+ import { WindowBorder, WindowMode } from "../components/Window";
3
+ import { WindowTitleButtonDefinition } from "../components/Window/WindowTitleButton";
4
+ import { NuInputBoxOptions, NuMessageBoxKind, NuMessageBoxOptions, NuMessageBoxPreset, NuMessageBoxResult } from "./dialogHelpers";
5
+ export type NuManagedWindowSnapshot = {
6
+ height?: number;
7
+ left?: number;
8
+ maximized?: boolean;
9
+ minimized?: boolean;
10
+ top?: number;
11
+ width?: number;
12
+ };
13
+ export type NuManagedWindowDefinition = {
14
+ appModal?: boolean;
15
+ bodyClassName?: string;
16
+ border?: WindowBorder;
17
+ className?: string;
18
+ closeable?: boolean;
19
+ content: ReactNode | ((controls: NuManagedWindowControls) => ReactNode);
20
+ domain?: string;
21
+ maximizable?: boolean;
22
+ modal?: boolean | string;
23
+ minimizable?: boolean;
24
+ mode?: WindowMode;
25
+ onClose?: (snapshot: NuManagedWindowSnapshot) => boolean | void;
26
+ onOpen?: () => NuManagedWindowSnapshot | void;
27
+ resizable?: boolean;
28
+ statusBar?: ReactNode;
29
+ style?: CSSProperties;
30
+ titleButtons?: WindowTitleButtonDefinition[];
31
+ title: string;
32
+ };
33
+ export type NuManagedWindowControls = {
34
+ bringToFront: () => void;
35
+ close: () => void;
36
+ id: string;
37
+ toggleMaximized: () => void;
38
+ toggleMinimized: () => void;
39
+ update: (patch: Partial<NuManagedWindowDefinition>) => void;
40
+ };
41
+ export type NuManagedWindowInfo = Omit<NuManagedWindowDefinition, "content"> & {
42
+ active: boolean;
43
+ id: string;
44
+ maximized: boolean;
45
+ minimized: boolean;
46
+ mode: WindowMode;
47
+ };
48
+ export type NuWindowBounds = {
49
+ height: number;
50
+ left: number;
51
+ top: number;
52
+ width: number;
53
+ };
54
+ export type { NuInputBoxOptions, NuMessageBoxKind, NuMessageBoxOptions, NuMessageBoxPreset, NuMessageBoxResult };
@@ -0,0 +1,150 @@
1
+ # API Reference
2
+
3
+ This is the top-level map of the public ReactNU API.
4
+
5
+ For internal implementation and extension rules, also read:
6
+
7
+ - [Contributor Guide](./CONTRIBUTOR_GUIDE.md)
8
+ - [Architecture](./ARCHITECTURE.md)
9
+ - [Storybook](./STORYBOOK.md)
10
+
11
+ ## Common Customization Contract
12
+
13
+ Many controls now support internal slot overrides through:
14
+
15
+ - `slotStyles`
16
+ - `slotClassNames`
17
+
18
+ See: [Slot Customization](./SLOT_CUSTOMIZATION.md)
19
+
20
+ ## Providers And Shell
21
+
22
+ - `NuThemeProvider`
23
+ docs: [NuThemeProvider](./NuThemeProvider.md)
24
+ - `NuDesktop`
25
+ docs: [Desktop](./Desktop.md)
26
+ - `Dashboard`
27
+ docs: [Dashboard](./Dashboard.md)
28
+ - `NuAppHostProvider`
29
+ docs: [NuAppHostProvider](./NuAppHostProvider.md)
30
+ - `NuWindowProvider`
31
+ docs: [NuWindowProvider](./NuWindowProvider.md)
32
+
33
+ ## Hooks
34
+
35
+ - `useNuTheme()`
36
+ reads and changes the active theme, provider typography, and desktop pattern mode
37
+ - `useAppHostMenu()`
38
+ manages the desktop-level main menu tree and item flags
39
+ - `useNuWindowManager()`
40
+ opens, updates, activates, and closes managed windows
41
+ also exposes `showMessageBox(...)` and `showInputBox(...)`
42
+ - `usePopupMenu()`
43
+ anchor/open helper for `PopupMenu`
44
+ - `useWindowMenu()`
45
+ accesses menu state from inside a managed window
46
+
47
+ ## Core Controls
48
+
49
+ - `Button`
50
+ docs: [Button](./Button.md)
51
+ - `CheckBox`
52
+ docs: [CheckBox](./CheckBox.md)
53
+ - `Dropdown`
54
+ docs: [Dropdown](./Dropdown.md)
55
+ - `ComboBox`
56
+ docs: [ComboBox](./ComboBox.md)
57
+ - `CommandButton`
58
+ docs: [CommandButton](./CommandButton.md)
59
+ - `Info`
60
+ docs: [Info](./Info.md)
61
+ - `MaskedField`
62
+ docs: [MaskedField](./MaskedField.md)
63
+ - `Memo`
64
+ docs: [Memo](./Memo.md)
65
+ - `Panel`
66
+ docs: [Panel](./Panel.md)
67
+ - `PageControl` / `Tabs`
68
+ docs: [PageControl](./PageControl.md)
69
+ - `ProgressBar`
70
+ docs: [ProgressBar](./ProgressBar.md)
71
+ - `RadioButton`, `RadioGroup`
72
+ docs: [RadioGroup](./RadioGroup.md)
73
+ - `SearchBox`
74
+ docs: [SearchBox](./SearchBox.md)
75
+ - `TextField`
76
+ docs: [TextField](./TextField.md)
77
+ - `SpinBox`
78
+ docs: [SpinBox](./SpinBox.md)
79
+ - `TickBar`
80
+ docs: [TickBar](./TickBar.md)
81
+
82
+ ## Data And Navigation Controls
83
+
84
+ - `ListBox`
85
+ docs: [ListBox](./ListBox.md)
86
+ - `ListView`
87
+ docs: [ListView](./ListView.md)
88
+ - `TreeView`
89
+ docs: [TreeView](./TreeView.md)
90
+ - `TreeListView`
91
+ docs: [TreeListView](./TreeListView.md)
92
+
93
+ ## Layout And Surfaces
94
+
95
+ - `Frame`
96
+ docs: [Frame](./Frame.md)
97
+ - `NuView`
98
+ docs: [NuView](./NuView.md)
99
+ - `PropertyGrid`
100
+ docs: [PropertyGrid](./PropertyGrid.md)
101
+ - `ReportCell`
102
+ docs: [ReportCell](./ReportCell.md)
103
+ - `Splitter`
104
+ docs: [Splitter](./Splitter.md)
105
+ - `Stack`
106
+ docs: [Stack](./Stack.md)
107
+ - `ToolBar`, `ToolButton`, `ToolSeparator`
108
+ docs: [ToolBar](./ToolBar.md)
109
+
110
+ ## Menus
111
+
112
+ - `MainMenu`
113
+ docs: [MainMenu](./MainMenu.md)
114
+ - `PopupMenu`
115
+ docs: [PopupMenu](./PopupMenu.md)
116
+
117
+ ## Windowing And Desktop Chrome
118
+
119
+ - `Window`
120
+ docs: [Window](./Window.md)
121
+ - `StatusBarItem`
122
+ docs: [StatusBarItem](./StatusBarItem.md)
123
+ - `AppBarHost`
124
+ docs: [AppBarHost](./AppBarHost.md)
125
+ - `AppBarItem`
126
+ docs: [AppBarItem](./AppBarItem.md)
127
+ - `WindowBar`
128
+ docs: [WindowBar](./WindowBar.md)
129
+ - `MessageBox` / `InputBox` helpers
130
+ docs: [Dialog Helpers](./DialogHelpers.md)
131
+
132
+ ## Visual Utilities
133
+
134
+ - `NuGlyph`
135
+ docs: [Glyph](./Glyph.md)
136
+ - `NuCrtGlitch`
137
+ docs: [CrtGlitch](./CrtGlitch.md)
138
+ - `nuThemes`
139
+ - `resolveNuTheme(...)`
140
+ - `isNuThemeName(...)`
141
+
142
+ ## Start Here
143
+
144
+ If you are new to the library, read in this order:
145
+
146
+ 1. [Getting Started](./GETTING_STARTED.md)
147
+ 2. [Architecture](./ARCHITECTURE.md)
148
+ 3. [NuThemeProvider](./NuThemeProvider.md)
149
+ 4. [Desktop](./Desktop.md)
150
+ 5. [NuWindowProvider](./NuWindowProvider.md)
@@ -0,0 +1,170 @@
1
+ # Architecture
2
+
3
+ ReactNU is organized around a desktop shell and explicit ownership boundaries.
4
+
5
+ ## Main Layers
6
+
7
+ 1. Theme tokens
8
+ 2. Low-level controls
9
+ 3. Desktop shell and window manager
10
+ 4. Host application composition
11
+
12
+ ## Desktop Ownership
13
+
14
+ Recommended ownership:
15
+
16
+ `NuThemeProvider -> NuDesktop -> workspace + app bar -> managed windows`
17
+
18
+ That means:
19
+
20
+ - `NuDesktop` owns screen geometry.
21
+ - `NuDesktop` composes `NuAppHostProvider` and `NuWindowProvider` for the full desktop shell.
22
+ - `NuWindowProvider` owns managed windows.
23
+ - the host owns main menu content and app bar composition.
24
+ - controls do not know about desktop layout unless they are part of windowing.
25
+
26
+ ## Window Ownership
27
+
28
+ Managed windows are opened through `useNuWindowManager()`:
29
+
30
+ - `openWindow(definition)`
31
+ - `openDialog(definition)`
32
+ - `updateWindow(id, patch)`
33
+ - `closeWindow(id)`
34
+
35
+ The host provides:
36
+
37
+ - title
38
+ - content
39
+ - optional persistence callbacks
40
+ - domain metadata
41
+
42
+ The manager provides:
43
+
44
+ - activation
45
+ - z-order
46
+ - modal behavior
47
+ - app-bar visibility state
48
+
49
+ ## Popup Ownership
50
+
51
+ Popup-like controls such as:
52
+
53
+ - `Dropdown`
54
+ - `ComboBox`
55
+ - `SearchBox`
56
+ - `PopupMenu`
57
+
58
+ use a shared ownership split:
59
+
60
+ - the control owns anchor measurement
61
+ - the popup layer renders into `document.body`
62
+ - theme variables are mirrored from the nearest `.nu-theme-root`
63
+
64
+ This avoids mixing local portal roots with viewport-based coordinates.
65
+
66
+ If a popup needs the same chrome as another control, prefer a shared internal primitive or shared helper over per-control duplication.
67
+
68
+ ## Scroll Ownership
69
+
70
+ ReactNU does not assume that every container should scroll automatically.
71
+
72
+ Recommended ownership:
73
+
74
+ - `Splitter cell -> NuView -> content`
75
+ - `Window body -> scrollable control`
76
+ - `Frame -> one filling child`
77
+
78
+ This keeps scroll behavior explicit and avoids hidden nested viewport bugs.
79
+
80
+ ## Slot Customization
81
+
82
+ ReactNU is standardizing internal customization around named slots.
83
+
84
+ Preferred API:
85
+
86
+ - `slotStyles`
87
+ - `slotClassNames`
88
+
89
+ Use this for component internals instead of inventing ad-hoc props like:
90
+
91
+ - `headerStyle`
92
+ - `inputShellClassName`
93
+ - `popupBackground`
94
+
95
+ See: [Slot Customization](./SLOT_CUSTOMIZATION.md)
96
+
97
+ ## Shared Internal Primitives
98
+
99
+ Not every repeated visual element should become a public component.
100
+
101
+ Preferred rule:
102
+
103
+ - shared public behavior -> public component
104
+ - shared internal geometry/chrome -> internal primitive
105
+
106
+ Example:
107
+
108
+ - `Dropdown` and `ComboBox` use the internal `ControlOpener` primitive so opener size, glyph metrics, border, and button chrome stay centralized.
109
+
110
+ ## Tree Ownership
111
+
112
+ `TreeView` and `TreeListView` own:
113
+
114
+ - hierarchy geometry
115
+ - connector rendering
116
+ - expand/collapse behavior
117
+ - keyboard navigation
118
+
119
+ The host owns:
120
+
121
+ - data
122
+ - selection/check state when controlled
123
+ - report-column rendering for `TreeListView`
124
+
125
+ ## Window Persistence
126
+
127
+ Managed windows can persist geometry with:
128
+
129
+ - `onOpen?: () => NuManagedWindowSnapshot | void`
130
+ - `onClose?: (snapshot) => boolean | void`
131
+
132
+ Use this when the host wants to restore:
133
+
134
+ - last position
135
+ - last size
136
+ - maximized state
137
+ - minimized state
138
+
139
+ ## Recommended Host Split
140
+
141
+ Keep host code separated by responsibility:
142
+
143
+ - desktop shell
144
+ - menu state
145
+ - app bar composition
146
+ - window launchers
147
+ - individual window content components
148
+
149
+ That keeps the component library reusable and avoids demo-only patterns leaking into product code.
150
+
151
+ ## Storybook Host Strategy
152
+
153
+ Storybook should distinguish between:
154
+
155
+ - full desktop-shell stories
156
+ - bounded window-manager stories
157
+
158
+ Use a full `NuDesktop` story when validating:
159
+
160
+ - desktop background
161
+ - menu/app-bar composition
162
+ - shell-level layering
163
+
164
+ Use a bounded `NuWindowProvider` story when validating:
165
+
166
+ - helper dialogs
167
+ - modal behavior
168
+ - managed window chrome inside a fixed preview area
169
+
170
+ This avoids accidental fullscreen/fixed-position behavior inside Storybook preview containers.
@@ -0,0 +1,22 @@
1
+ # AppBarHost
2
+
3
+ `AppBarHost` is the bottom chrome container for desktop bar content.
4
+
5
+ ## Usage
6
+
7
+ ```tsx
8
+ <AppBarHost inline>
9
+ <WindowBar items={windowManager.windows} onActivateWindow={handleActivate} />
10
+ <CalendarAppBarItem />
11
+ </AppBarHost>
12
+ ```
13
+
14
+ ## Key Props
15
+
16
+ - `children`
17
+ - `inline?: boolean`
18
+
19
+ ## Notes
20
+
21
+ - `inline` is intended for `NuDesktop` layout usage.
22
+ - The host is intentionally dumb; the application decides which app-bar items to place inside it.
@@ -0,0 +1,22 @@
1
+ # AppBarItem
2
+
3
+ `AppBarItem` is the generic item primitive for desktop bar content such as clocks, indicators, or task entries.
4
+
5
+ ## Usage
6
+
7
+ ```tsx
8
+ <AppBarItem alignment="end">12:30</AppBarItem>
9
+ ```
10
+
11
+ ## Key Props
12
+
13
+ - `alignment?: "start" | "end"`
14
+ - `active?: boolean`
15
+ - `grow?: boolean`
16
+ - `interactive?: boolean`
17
+ - standard static or button-like props depending on usage
18
+
19
+ ## Notes
20
+
21
+ - `AppBarItem` can render as static chrome or as an interactive item.
22
+ - `WindowBar` is built on top of this primitive rather than embedding its own task-button styling.
package/docs/Button.md ADDED
@@ -0,0 +1,24 @@
1
+ # Button
2
+
3
+ `Button` is the basic action control for the library.
4
+
5
+ ## Usage
6
+
7
+ ```tsx
8
+ <Button variant="primary">Commit</Button>
9
+ <Button variant="secondary">Preview</Button>
10
+ <Button variant="danger">Reset</Button>
11
+ <Button variant="success">Apply</Button>
12
+ ```
13
+
14
+ ## Key Props
15
+
16
+ - `variant?: "primary" | "secondary" | "danger" | "success"`
17
+ - `focused?: boolean`
18
+ - `defaultFocused?: boolean`
19
+ - standard `button` props such as `disabled`, `onClick`, `type`
20
+
21
+ ## Notes
22
+
23
+ - Visual focus is rendered with DOS-style side markers instead of a browser outline.
24
+ - Press state is purely visual and does not change layout around neighboring controls.
@@ -0,0 +1,64 @@
1
+ # Component Index
2
+
3
+ ## Guides
4
+
5
+ - [Getting Started](./GETTING_STARTED.md)
6
+ - [Architecture](./ARCHITECTURE.md)
7
+ - [API Reference](./API_REFERENCE.md)
8
+ - [Contributor Guide](./CONTRIBUTOR_GUIDE.md)
9
+ - [Slot Customization](./SLOT_CUSTOMIZATION.md)
10
+ - [Storybook](./STORYBOOK.md)
11
+
12
+ ## Core Components
13
+
14
+ - [Button](./Button.md)
15
+ - [CheckBox](./CheckBox.md)
16
+ - [Dashboard](./Dashboard.md)
17
+ - [Desktop](./Desktop.md)
18
+ - [Dropdown](./Dropdown.md)
19
+ - [Frame](./Frame.md)
20
+ - [Glyph](./Glyph.md)
21
+ - [Info](./Info.md)
22
+ - [ListBox](./ListBox.md)
23
+ - [ListView](./ListView.md)
24
+ - [MainMenu](./MainMenu.md)
25
+ - [MaskedField](./MaskedField.md)
26
+ - [Memo](./Memo.md)
27
+ - [PageControl](./PageControl.md)
28
+ - [Panel](./Panel.md)
29
+ - [PopupMenu](./PopupMenu.md)
30
+ - [PropertyGrid](./PropertyGrid.md)
31
+ - [ProgressBar](./ProgressBar.md)
32
+ - [RadioGroup](./RadioGroup.md)
33
+ - [ReportCell](./ReportCell.md)
34
+ - [SearchBox](./SearchBox.md)
35
+ - [SpinBox](./SpinBox.md)
36
+ - [Stack](./Stack.md)
37
+ - [Splitter](./Splitter.md)
38
+ - [TextField](./TextField.md)
39
+ - [TickBar](./TickBar.md)
40
+ - [ToolBar](./ToolBar.md)
41
+ - [TreeListView](./TreeListView.md)
42
+ - [TreeView](./TreeView.md)
43
+ - [NuView](./NuView.md)
44
+ - [Window](./Window.md)
45
+ - [StatusBarItem](./StatusBarItem.md)
46
+ - [ComboBox](./ComboBox.md)
47
+ - [CommandButton](./CommandButton.md)
48
+ - [CrtGlitch](./CrtGlitch.md)
49
+
50
+ ## App Bar And Windowing
51
+
52
+ - [AppBarHost](./AppBarHost.md)
53
+ - [AppBarItem](./AppBarItem.md)
54
+ - [WindowBar](./WindowBar.md)
55
+ - [NuWindowProvider](./NuWindowProvider.md)
56
+
57
+ ## Providers
58
+
59
+ - [NuThemeProvider](./NuThemeProvider.md)
60
+ - [NuAppHostProvider](./NuAppHostProvider.md)
61
+
62
+ ## Design System
63
+
64
+ - [Token Checklist](./TOKEN_CHECKLIST.md)