relly-ui 0.0.0-stage โ†’ 1.0.1

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rell
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,184 @@
1
- # Temporary Holding Version
1
+ # relly-ui ๐ŸŽ›๏ธ
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ > **Senior-grade, zero-dependency, ultra-performant GUI control panel library for JavaScript & TypeScript.**
4
+ > Built for creative coders, WebGL/WebGPU developers, canvas simulations, game tools, and runtime debugging. Features complete Shadow DOM style isolation, seamless CDN `<script>` support, interactive Web Audio feedback, and a Fluent chaining API.
5
+
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
+ [![Zero Dependencies](https://img.shields.io/badge/dependencies-0-success.svg)](package.json)
8
+ [![Tests Passing](https://img.shields.io/badge/tests-67%2F67%20passed-success.svg)](tests/)
9
+ [![TypeScript Ready](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](tsconfig.json)
10
+ [![Bundle Size](https://img.shields.io/badge/bundle-22KB%20gzip-purple.svg)](dist/)
11
+
12
+ ---
13
+
14
+ ## ๐ŸŒŸ Key Features
15
+
16
+ - ๐Ÿ“ฆ **Zero Runtime Dependencies** โ€” 0 external packages. Ultra-lightweight footprint (~22 KB gzipped).
17
+ - ๐Ÿ›ก๏ธ **100% Shadow DOM Isolation** โ€” Host page styles (Tailwind, Bootstrap, CSS resets) can never bleed in or break the GUI layout.
18
+ - ๐ŸŒ **CDN-First & IIFE Ready** โ€” Importable via a single `<script>` tag: exposes `window.RellyUI` and auto-injects required styles.
19
+ - ๐Ÿ“ˆ **Next-Gen Telemetry HUD Graph** โ€” Canvas time-series with smooth cubic Bezier curves, glowing gradients, multi-series support (`addSeries`), live pulse dot, hover crosshair inspector, click-to-pause inspection, and continuous timeline scrolling without freezing.
20
+ - ๐ŸŽš๏ธ **Rich Component Suite**:
21
+ - `Slider` โ€” Numeric slider with virtual jog-dial scrubbing (`Shift` ร—10 / `Alt` ร—0.1 modifiers) and direct text editing.
22
+ - `Point2D` & `Point3D / Vector3` โ€” 2D and 3D vectors with color-coded RGB axes (X โ€” red, Y โ€” green, Z โ€” blue) and drag scrubbing.
23
+ - `RangeSlider` โ€” Dual-handle interval slider `[min, max]` with draggable range bar and dual inputs.
24
+ - `Segmented` โ€” Fast single-click mode switcher with an animated sliding pill indicator.
25
+ - `ColorPicker` โ€” Color preview with quick swatches palette and native screen EyeDropper API integration.
26
+ - `Checkbox`, `Button`, `Select`, `DynamicLabel`.
27
+ - `StatusIndicator` โ€” Live pulsing LED status indicator with badge (`online`, `busy`, `offline`, `info`, `ready`).
28
+ - ๐ŸŽจ **8 Designer Themes** โ€” `dark`, `light`, `tokyo-night`, `matrix`, `synthwave`, `cyberpunk`, `nord`, `dracula`, plus custom theme object support.
29
+ - ๐Ÿ”Š **Web Audio Sound FX (4 Sound Packs)** โ€” Synthetic interface micro-sounds without external audio assets (`synth`, `mechanical`, `bubble`, `arcade`) with volume control.
30
+ - ๐Ÿ’พ **Session AutoSave (`autoSave: true`)** โ€” Automatic debounced persistence and restoration of component values, panel layout, collapsed state, and theme to `localStorage`.
31
+ - ๐Ÿ“‹ **Custom Context Menu (`setContextMenu`)** โ€” UI creators configure custom right-click actions per control (reset to default, copy value, custom actions).
32
+ - ๐Ÿ”” **In-Panel Toast Notifications (`ui.notify`)** โ€” Non-blocking notification stack (`success`, `warning`, `error`, `info`) with smooth animations and audio chime.
33
+ - โคข **Mini-HUD Mode** โ€” Instant floating pill mode with a live sparkline canvas, toggled by double-clicking the header or pressing `โคข`.
34
+ - ๐Ÿ” **Real-Time Search Bar** โ€” Filter components instantly with `/` shortcut and robust keyboard event isolation.
35
+ - ๐Ÿ“ฅ **JSON Presets Import/Export** โ€” Modal dialog with Drag & Drop `.json` file parsing, syntax validation, and clipboard export.
36
+ - ๐Ÿ”€ **Conditional Visibility (`showIf`)** โ€” Dynamically show/hide controls and entire sections using boolean predicates.
37
+ - ๐ŸชŸ **Draggable & Resizable** โ€” Fluid header dragging, corner resize handle, and viewport boundary protection against clipping during browser zoom.
38
+
39
+ ---
40
+
41
+ ## ๐Ÿš€ Quick Start
42
+
43
+ ### 1. Direct CDN / Browser `<script>`
44
+
45
+ ```html
46
+ <!DOCTYPE html>
47
+ <html>
48
+ <head>
49
+ <meta charset="utf-8" />
50
+ <title>RellyUI Demo</title>
51
+ </head>
52
+ <body>
53
+ <script src="https://unpkg.com/relly-ui/dist/relly-ui.iife.js"></script>
54
+ <script>
55
+ const state = {
56
+ speed: 1.5,
57
+ mode: 'solid',
58
+ color: '#6366f1',
59
+ vector: { x: 0, y: 10, z: -5 },
60
+ bounds: [10, 80],
61
+ active: true
62
+ };
63
+
64
+ const ui = new RellyUI({
65
+ title: 'Simulation Controls',
66
+ theme: 'tokyo-night',
67
+ soundPack: 'mechanical',
68
+ autoSave: true,
69
+ searchBar: true
70
+ });
71
+
72
+ ui.addSlider(state, 'speed', { min: 0, max: 10, step: 0.1 })
73
+ .setLabel('Speed');
74
+
75
+ ui.addSegmented(state, 'mode', ['wireframe', 'solid', 'points'])
76
+ .setLabel('Render Mode');
77
+
78
+ ui.addPoint3D(state, 'vector', { min: -20, max: 20 })
79
+ .setLabel('Wind Vector');
80
+
81
+ ui.addRange(state, 'bounds', { min: 0, max: 100 })
82
+ .setLabel('Clipping Range');
83
+
84
+ ui.addColor(state, 'color')
85
+ .setLabel('Primary Color')
86
+ .setSwatches(['#6366f1', '#00ff66', '#00f0ff', '#ff71ce', '#f59e0b']);
87
+ </script>
88
+ </body>
89
+ </html>
90
+ ```
91
+
92
+ ### 2. Modern ESM / npm
93
+
94
+ ```bash
95
+ npm install relly-ui
96
+ ```
97
+
98
+ ```typescript
99
+ import { RellyUI } from 'relly-ui';
100
+
101
+ const state = { fps: 60, particles: 200 };
102
+
103
+ const ui = new RellyUI({
104
+ title: 'Engine HUD',
105
+ theme: 'matrix',
106
+ autoSave: true
107
+ });
108
+
109
+ ui.addGraph(state, 'fps')
110
+ .setLabel('Telemetry')
111
+ .setColor('#00ff66');
112
+ ```
113
+
114
+ ---
115
+
116
+ ## ๐Ÿ“– Component API Reference
117
+
118
+ | Method | Description | Supported Data Types |
119
+ |---|---|---|
120
+ | `ui.addSlider(obj, prop, opts)` | Slider with mouse jog-dial scrubbing | `number` |
121
+ | `ui.addPoint2D(obj, prop, opts)` | 2D vector with X and Y drag scrubbing | `{x, y}` or `[x, y]` |
122
+ | `ui.addPoint3D(obj, prop, opts)` | 3D vector with color-coded RGB axes | `{x, y, z}` or `[x, y, z]` |
123
+ | `ui.addRange(obj, prop, opts)` | Dual-handle range slider `[min, max]` | `[min, max]` or `{min, max}` |
124
+ | `ui.addSegmented(obj, prop, opts)`| Segmented button group switcher | `string`, `number` |
125
+ | `ui.addColor(obj, prop)` | Color picker with swatches & EyeDropper | `string` (HEX/RGB) |
126
+ | `ui.addCheckbox(obj, prop)` | Boolean toggle checkbox | `boolean` |
127
+ | `ui.addSelect(obj, prop, options)`| Dropdown selection menu | Array or Record |
128
+ | `ui.addGraph(obj, prop)` | Time-series telemetry canvas with Bezier curve | `number` |
129
+ | `ui.addStatus(obj, prop, status)` | Pulsing animated LED status indicator | `online`, `busy`, `offline`, `info`, `ready` |
130
+ | `ui.addDynamicLabel(obj, prop)` | Reactive text readout | `any` |
131
+ | `ui.addButton(label, onClick)` | Action push button | Callback function |
132
+ | `ui.addTab(title)` | Multi-tab container | Returns `Tab` container |
133
+ | `ui.addSection(title, collapsed)` | Collapsible section / folder | Returns `Section` container |
134
+ | `ui.addRow()` | Multi-column inline layout row | Returns `Row` container |
135
+
136
+ ### Advanced Features & Interactions:
137
+
138
+ - **Custom Context Menu**:
139
+ ```typescript
140
+ const speed = ui.addSlider(state, 'speed', { min: 0, max: 10 });
141
+ speed.setContextMenu([
142
+ { label: 'Reset to Default (1.0)', action: (c) => c.reset() },
143
+ { label: 'Copy Value', action: (c) => navigator.clipboard.writeText(c.getValue()) },
144
+ { separator: true, label: '' },
145
+ { label: 'Turbo Mode (10.0)', danger: true, action: (c) => c.setValue(10) }
146
+ ]);
147
+ ```
148
+
149
+ - **In-Panel Toast Notifications**:
150
+ ```typescript
151
+ ui.notify('Configuration saved!', 'success');
152
+ ui.notify('High memory usage detected', 'warning');
153
+ ```
154
+
155
+ - **Runtime Themes & Sound Packs**:
156
+ ```typescript
157
+ ui.setTheme('tokyo-night'); // 'dark' | 'light' | 'tokyo-night' | 'matrix' | 'synthwave' | 'cyberpunk' | 'nord' | 'dracula'
158
+ ui.setSoundPack('mechanical'); // 'synth' | 'mechanical' | 'bubble' | 'arcade'
159
+ ui.setSoundVolume(0.8);
160
+ ```
161
+
162
+ ---
163
+
164
+ ## ๐Ÿ›  Development & Testing
165
+
166
+ ```bash
167
+ # Launch interactive playground dev server
168
+ npm run dev
169
+
170
+ # Run Vitest test suite (67 tests)
171
+ npm run test
172
+
173
+ # Run TypeScript typecheck (0 errors)
174
+ npm run typecheck
175
+
176
+ # Build all production targets (ESM, IIFE, UMD, CSS, .d.ts)
177
+ npm run build
178
+ ```
179
+
180
+ ---
181
+
182
+ ## ๐Ÿ“„ License
183
+
184
+ MIT License ยฉ 2026 Rell