@minspa/framework 0.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.
Files changed (3) hide show
  1. package/README.md +183 -0
  2. package/index.js +20 -0
  3. package/package.json +25 -0
package/README.md ADDED
@@ -0,0 +1,183 @@
1
+ # Minspa Framework Package
2
+
3
+ **[Minspa](https://github.com/devosm1030/minspa)** is a modern lightweight UI framework for building Single Page Applications (SPAs) with vanilla JavaScript.
4
+
5
+ This is the all-in-one framework package that bundles all Minspa components into a single dependency. Install this package to get the complete Minspa framework with one command.
6
+
7
+ - **Modular** - Written as ES modules, supported by all modern browsers
8
+ - **Dependency free** - Zero external dependencies
9
+ - **Flexible** - Use as npm packages or clone components directly into your project
10
+ - **Vanilla JavaScript** - No build tools required (but fully compatible with bundlers)
11
+ - **Lightweight** - Minimal footprint with maximum functionality
12
+
13
+ ## Quick Start
14
+
15
+ ### Installation
16
+
17
+ ```bash
18
+ npm install @minspa/framework
19
+ ```
20
+
21
+ ### Usage
22
+
23
+ Import components from the framework package:
24
+
25
+ ```javascript
26
+ import { Router, appstate, Navbar, modalSvc } from '@minspa/framework'
27
+ ```
28
+
29
+ ## What's Included
30
+
31
+ The Framework package includes all core Minspa components:
32
+
33
+ - **[@minspa/router](https://github.com/devosm1030/minspa/tree/main/packages/Router)** - Client-side routing with authentication and lifecycle management
34
+ - **[@minspa/appstate](https://github.com/devosm1030/minspa/tree/main/packages/AppState)** - Reactive state management with persistence
35
+ - **[@minspa/navbar](https://github.com/devosm1030/minspa/tree/main/packages/Navbar)** - Responsive navigation component with Shadow DOM
36
+ - **[@minspa/modal](https://github.com/devosm1030/minspa/tree/main/packages/Modal)** - Modal dialogs with promise-based API
37
+
38
+ ## Why Use This Package?
39
+
40
+ ### Advantages
41
+
42
+ - **Single Dependency** - Install all Minspa components with one command
43
+ - **Consistent Versioning** - All components are version-matched for compatibility
44
+ - **Simpler Imports** - Import everything from one package
45
+ - **Zero External Dependencies** - No nested dependencies to manage
46
+
47
+ ### When to Use
48
+
49
+ ✅ **Use the Framework package when:**
50
+
51
+ - You're using **multiple Minspa components** in your project
52
+ - You prefer the **convenience of a single dependency**
53
+ - You're already using **Node.js and npm** in your workflow
54
+ - You want **consistent versioning** across all components
55
+
56
+ ### Alternatives
57
+
58
+ **Individual Packages** - Install only what you need:
59
+
60
+ ```bash
61
+ npm install @minspa/router @minspa/appstate
62
+ ```
63
+
64
+ ```javascript
65
+ import { Router } from '@minspa/router'
66
+ import { appstate } from '@minspa/appstate'
67
+ ```
68
+
69
+ Use individual packages when you only need one or two components or want fine-grained control over component versions.
70
+
71
+ **Vanilla Files** - Clone component files directly into your project:
72
+
73
+ ```javascript
74
+ import { Router } from './lib/MinspaRouter.js'
75
+ import { appstate } from './lib/MinspaAppstate.js'
76
+ ```
77
+
78
+ Use vanilla files when you want to avoid Node.js/npm entirely, prefer to directly customize source files, or want maximum control and transparency.
79
+
80
+ ## Component Overview
81
+
82
+ ### Router
83
+
84
+ Client-side routing for single-page applications with authentication and lifecycle management.
85
+
86
+ **Key Features:**
87
+
88
+ - Route registration and navigation
89
+ - Authentication and authorization hooks
90
+ - Lifecycle hooks (mount/unmount)
91
+ - Browser history integration
92
+ - Navigation listeners
93
+
94
+ [View full Router documentation →](https://github.com/devosm1030/minspa/tree/main/packages/Router)
95
+
96
+ ### Appstate
97
+
98
+ Reactive state management with built-in sessionStorage persistence.
99
+
100
+ **Key Features:**
101
+
102
+ - Event-based state management (pub-sub pattern)
103
+ - Automatic sessionStorage persistence
104
+ - Multiple isolated state instances
105
+ - Proxy-based property access
106
+ - Browser and Node.js compatible
107
+
108
+ [View full Appstate documentation →](https://github.com/devosm1030/minspa/tree/main/packages/AppState)
109
+
110
+ ### Navbar
111
+
112
+ Responsive navigation bar component with Bootstrap-like styling.
113
+
114
+ **Key Features:**
115
+
116
+ - Bootstrap-style appearance (no Bootstrap dependency)
117
+ - Shadow DOM style encapsulation
118
+ - Responsive mobile design with collapsible menu
119
+ - Active state management
120
+ - User display support
121
+ - Customizable styling
122
+
123
+ [View full Navbar documentation →](https://github.com/devosm1030/minspa/tree/main/packages/Navbar)
124
+
125
+ ### Modal
126
+
127
+ Modal service for displaying dialogs with Bootstrap-like styling.
128
+
129
+ **Key Features:**
130
+
131
+ - Shadow DOM encapsulation
132
+ - Modal queuing (automatic sequential display)
133
+ - Promise-based API (async/await support)
134
+ - Smart loader with flicker prevention
135
+ - Multiple modal types (info, confirmation, loader)
136
+
137
+ [View full Modal documentation →](https://github.com/devosm1030/minspa/tree/main/packages/Modal)
138
+
139
+ ## Examples
140
+
141
+ The [Minspa repository](https://github.com/devosm1030/minspa) includes complete working examples:
142
+
143
+ ### [Basic Navigation Example](https://github.com/devosm1030/minspa/tree/main/examples/basicNavigation)
144
+
145
+ A simple SPA demonstrating routing and navigation without authentication.
146
+
147
+ **Demonstrates:**
148
+
149
+ - Basic routing setup
150
+ - Navbar integration
151
+ - Page navigation
152
+ - Vanilla JavaScript usage (no build tools)
153
+
154
+ ### [Full SPA with Authentication Example](https://github.com/devosm1030/minspa/tree/main/examples/fullSPAWithAuth)
155
+
156
+ A complete SPA with authentication, authorization, and role-based access control.
157
+
158
+ **Demonstrates:**
159
+
160
+ - User authentication flows
161
+ - Protected routes
162
+ - Role-based page access
163
+ - State management with persistence
164
+ - Modal dialogs
165
+ - Session handling
166
+
167
+ Both examples can be run directly in a web browser without any build step.
168
+
169
+ ## Full Documentation
170
+
171
+ For comprehensive documentation including:
172
+
173
+ - What Minspa is and its design philosophy
174
+ - Detailed component capabilities and use cases
175
+ - When to use (or not use) Minspa
176
+ - API references and examples
177
+ - Contributing guidelines
178
+
179
+ Please see the [main Minspa documentation](https://github.com/devosm1030/minspa).
180
+
181
+ ## License
182
+
183
+ MIT License - see [LICENSE](https://github.com/devosm1030/minspa/blob/main/LICENSE) file for details
package/index.js ADDED
@@ -0,0 +1,20 @@
1
+ /*
2
+ Minspa Framework v0.0.1 (https://github.com/devosm1030/minspa/)
3
+ Copyright 2026 Mike DeVos
4
+ Licensed under MIT (https://github.com/devosm1030/minspa/blob/main/LICENSE)
5
+
6
+ A mini vanilla UI SPA framework.
7
+ */
8
+
9
+ import { modalSvc } from '@minspa/modal'
10
+ import { appstate, appstateFor } from '@minspa/appstate'
11
+ import { Router } from '@minspa/router'
12
+ import { Navbar } from '@minspa/navbar'
13
+
14
+ export {
15
+ modalSvc,
16
+ appstate,
17
+ appstateFor,
18
+ Router,
19
+ Navbar,
20
+ }
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@minspa/framework",
3
+ "version": "0.0.1",
4
+ "description": "A vanilla UI SPA framework.",
5
+ "main": "index.js",
6
+ "author": "Mike DeVos",
7
+ "license": "MIT",
8
+ "scripts": {
9
+ "publish": "npm publish --access public"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/devosm1030/minspa.git"
14
+ },
15
+ "bugs": {
16
+ "url": "https://github.com/devosm1030/minspa/issues"
17
+ },
18
+ "homepage": "https://github.com/devosm1030/minspa#readme",
19
+ "dependencies": {
20
+ "@minspa/appstate": "^0.0.0",
21
+ "@minspa/modal": "^0.0.2",
22
+ "@minspa/navbar": "^0.0.2",
23
+ "@minspa/router": "^0.0.2"
24
+ }
25
+ }