viewlogic 1.1.2 → 1.2.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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ViewLogic Router v1.1.1
1
+ # ViewLogic Router
2
2
 
3
3
  <p align="center">
4
4
  <a href="https://github.com/hopegiver/viewlogic">
@@ -14,14 +14,6 @@
14
14
 
15
15
  > A revolutionary Vue 3 routing system with View-Logic separation and Zero Build Development
16
16
 
17
- ## 🆕 Latest Updates (v1.1.1)
18
-
19
- - ✨ **Automatic Form Handling** - Revolutionary form submission with `{paramName}` variable parameters
20
- - 🔄 **Multiple API Support** - Parallel data fetching from multiple APIs with named data storage
21
- - 🛡️ **Enhanced Validation** - HTML5 + custom function validation with graceful error handling
22
- - 🚀 **Component Loading Resilience** - Router continues to work even if components fail to load
23
- - 📝 **Comprehensive Documentation** - Extensive real-world examples and usage patterns
24
-
25
17
  ## 🎯 Core Philosophy: Simplicity Through Design
26
18
 
27
19
  ViewLogic Router revolutionizes Vue development with two fundamental core principles:
@@ -260,6 +252,75 @@ const config = {
260
252
  };
261
253
  ```
262
254
 
255
+ ### 🏗️ Subfolder Deployment Support
256
+
257
+ ViewLogic Router supports deployment in subfolders with smart path resolution:
258
+
259
+ ```javascript
260
+ // Root deployment: https://example.com/
261
+ ViewLogicRouter({
262
+ basePath: '/src', // → https://example.com/src
263
+ routesPath: '/routes', // → https://example.com/routes
264
+ i18nPath: '/i18n' // → https://example.com/i18n
265
+ });
266
+
267
+ // Subfolder deployment: https://example.com/myapp/
268
+ ViewLogicRouter({
269
+ basePath: 'src', // → https://example.com/myapp/src (relative)
270
+ routesPath: 'routes', // → https://example.com/myapp/routes (relative)
271
+ i18nPath: 'i18n', // → https://example.com/myapp/i18n (relative)
272
+ });
273
+
274
+ // Mixed paths: https://example.com/projects/myapp/
275
+ ViewLogicRouter({
276
+ basePath: './src', // → https://example.com/projects/myapp/src
277
+ routesPath: '../shared/routes', // → https://example.com/projects/shared/routes
278
+ i18nPath: '/global/i18n' // → https://example.com/global/i18n (absolute)
279
+ });
280
+ ```
281
+
282
+ **Path Resolution Rules:**
283
+ - **Absolute paths** (`/path`) → `https://domain.com/path`
284
+ - **Relative paths** (`path`, `./path`) → Resolved from current page location
285
+ - **Parent paths** (`../path`) → Navigate up directory levels
286
+ - **HTTP URLs** → Used as-is (no processing)
287
+
288
+ ### 🔄 Hash vs History Mode in Subfolders
289
+
290
+ Both routing modes work seamlessly in subfolder deployments:
291
+
292
+ ```javascript
293
+ // Hash Mode (recommended for subfolders)
294
+ // URL: https://example.com/myapp/#/products?id=123
295
+ ViewLogicRouter({
296
+ mode: 'hash' // Works anywhere, no server config needed
297
+ });
298
+
299
+ // History Mode (requires server configuration)
300
+ // URL: https://example.com/myapp/products?id=123
301
+ ViewLogicRouter({
302
+ mode: 'history' // Cleaner URLs, needs server setup
303
+ });
304
+ ```
305
+
306
+ **History Mode Server Configuration:**
307
+ ```nginx
308
+ # Nginx - redirect all subfolder requests to index.html
309
+ location /myapp/ {
310
+ try_files $uri $uri/ /myapp/index.html;
311
+ }
312
+ ```
313
+
314
+ ```apache
315
+ # Apache .htaccess in /myapp/ folder
316
+ RewriteEngine On
317
+ RewriteBase /myapp/
318
+ RewriteRule ^index\.html$ - [L]
319
+ RewriteCond %{REQUEST_FILENAME} !-f
320
+ RewriteCond %{REQUEST_FILENAME} !-d
321
+ RewriteRule . /myapp/index.html [L]
322
+ ```
323
+
263
324
  ## 📖 Complete API Documentation
264
325
 
265
326
  For comprehensive API documentation including all methods, configuration options, and detailed examples, see: