slicejs-web-framework 4.0.2 → 4.1.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 (73) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +97 -97
  3. package/Slice/Components/Structural/ContextManager/ContextManager.js +422 -422
  4. package/Slice/Components/Structural/ContextManager/ContextManagerDebugger.js +470 -470
  5. package/Slice/Components/Structural/Controller/Controller.js +1406 -1406
  6. package/Slice/Components/Structural/Controller/allowedValuesValidation.js +52 -52
  7. package/Slice/Components/Structural/Debugger/Debugger.html +72 -72
  8. package/Slice/Components/Structural/Debugger/Debugger.js +1505 -1505
  9. package/Slice/Components/Structural/EventManager/EventManager.js +651 -651
  10. package/Slice/Components/Structural/EventManager/EventManagerDebugger.js +985 -985
  11. package/Slice/Components/Structural/LeakInspector/LeakInspector.js +296 -296
  12. package/Slice/Components/Structural/Logger/Log.js +10 -10
  13. package/Slice/Components/Structural/Logger/LogViewer/LogViewer.js +662 -662
  14. package/Slice/Components/Structural/Logger/Logger.js +225 -225
  15. package/Slice/Components/Structural/Router/Router.js +820 -810
  16. package/Slice/Components/Structural/Router/applyRouteMetadata.js +39 -0
  17. package/Slice/Components/Structural/StylesManager/StylesManager.js +82 -82
  18. package/Slice/Components/Structural/StylesManager/ThemeManager/ThemeManager.js +175 -175
  19. package/Slice/Slice.js +711 -710
  20. package/api/framework/devDepsOptimizer.js +335 -335
  21. package/api/framework/express.js +3 -3
  22. package/api/framework/precompressedStatic.js +102 -93
  23. package/api/framework/publicEnvResolver.js +123 -123
  24. package/api/framework/securityMiddleware.js +197 -197
  25. package/api/framework/seo.js +387 -0
  26. package/api/framework/server.js +777 -410
  27. package/api/index.js +14 -4
  28. package/package.json +6 -2
  29. package/sliceConfig.schema.json +122 -122
  30. package/src/App/index.html +69 -69
  31. package/src/App/index.js +20 -20
  32. package/src/App/style.css +11 -11
  33. package/src/Components/AppComponents/AboutSection/AboutSection.css +9 -9
  34. package/src/Components/AppComponents/AboutSection/AboutSection.html +8 -8
  35. package/src/Components/AppComponents/AboutSection/AboutSection.js +12 -12
  36. package/src/Components/AppComponents/AppShell/AppShell.css +10 -10
  37. package/src/Components/AppComponents/AppShell/AppShell.html +4 -4
  38. package/src/Components/AppComponents/AppShell/AppShell.js +36 -36
  39. package/src/Components/AppComponents/HomeSection/HomeSection.css +20 -20
  40. package/src/Components/AppComponents/HomeSection/HomeSection.html +10 -10
  41. package/src/Components/AppComponents/HomeSection/HomeSection.js +19 -19
  42. package/src/Components/components.js +8 -8
  43. package/src/public/Styles/sliceStyles.css +34 -34
  44. package/src/public/Themes/Dark.css +42 -42
  45. package/src/public/Themes/Light.css +31 -31
  46. package/src/public/Themes/Slice.css +47 -47
  47. package/src/public/manifest.json +15 -15
  48. package/src/public/robots.txt +4 -4
  49. package/src/public/sitemap.xml +8 -8
  50. package/src/routes.js +9 -9
  51. package/src/sliceConfig.json +72 -72
  52. package/types/index.d.ts +219 -219
  53. package/.opencode/opencode.json +0 -15
  54. package/Slice/tests/build-bundled-component-without-category.test.js +0 -103
  55. package/Slice/tests/build-js-only-visual-components.test.js +0 -144
  56. package/Slice/tests/build-singleton.test.js +0 -244
  57. package/Slice/tests/bundle-v2-runtime-contract.test.js +0 -747
  58. package/Slice/tests/context-patch-use.test.js +0 -95
  59. package/Slice/tests/destroy-cascade.test.js +0 -215
  60. package/Slice/tests/event-emitters.test.js +0 -79
  61. package/Slice/tests/event-registry.test.js +0 -141
  62. package/Slice/tests/fixtures/real-runtime-loader.mjs +0 -21
  63. package/Slice/tests/leak-orphans.test.js +0 -131
  64. package/Slice/tests/props-allowed-values-validation.test.js +0 -119
  65. package/Slice/tests/public-env-runtime-accessors.test.js +0 -44
  66. package/Slice/tests/public-env-typed-accessors.test.js +0 -66
  67. package/Slice/tests/router-loading-finally.test.js +0 -68
  68. package/api/tests/dev-deps-optimizer.test.js +0 -137
  69. package/api/tests/dev-server-external.test.js +0 -56
  70. package/api/tests/precompressed-static.test.js +0 -119
  71. package/api/tests/public-env-resolver.test.js +0 -193
  72. package/tests/router-build-failure.test.js +0 -125
  73. package/tests/router-emit-ordering.test.js +0 -63
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Victor Jose Kneider Alnahi and Julio Antonio Graterol Bracho
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Victor Jose Kneider Alnahi and Julio Antonio Graterol Bracho
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,97 +1,97 @@
1
- <div align="center">
2
- <img src="readme_images/Slice.js-logo.svg" alt="Slice.js logo" width="150" />
3
- <h1>Slice.js</h1>
4
- <p>Component-Based Web Development Framework</p>
5
- <p>
6
- <a href="https://slice-js-docs.vercel.app/Documentation"><strong>Explore the docs »</strong></a>
7
- <br />
8
- <a href="https://slice-js-docs.vercel.app/">View Demo</a>
9
- ·
10
- <a href="https://github.com/VKneider/slice.js/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
11
- ·
12
- <a href="https://github.com/VKneider/slice.js/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
13
- </p>
14
- </div>
15
-
16
- ## About this repository
17
-
18
- This repository contains the core of the Slice.js framework: the component runtime, routing system, bundle engine, and framework API. It is the package published as `slicejs-web-framework` on npm.
19
-
20
- ## Prerequisites
21
-
22
- - Node.js >= 20
23
- - npm or pnpm
24
-
25
- ## Local development
26
-
27
- 1. **Clone the repository**
28
- ```bash
29
- git clone https://github.com/VKneider/slice.js.git
30
- cd slice.js
31
- ```
32
-
33
- 2. **Install dependencies**
34
- ```bash
35
- npm install
36
- ```
37
-
38
- 3. **Initialize a test project** (optional, for CLI-based development)
39
- ```bash
40
- npx slicejs-cli init
41
- ```
42
-
43
- 4. **Test changes locally**
44
- ```bash
45
- npx slicejs-cli dev
46
- ```
47
-
48
- ## Available commands
49
-
50
- The framework does not expose commands directly. Use it through the CLI (`slicejs-cli`):
51
-
52
- | Command | Description |
53
- |---------|-------------|
54
- | `npx slicejs-cli init` | Initialize a Slice.js project |
55
- | `npx slicejs-cli dev` | Start development server |
56
- | `npx slicejs-cli build` | Build for production |
57
- | `npx slicejs-cli start` | Serve production build |
58
-
59
- ## Documentation
60
-
61
- Full documentation is available at [slice-js-docs.vercel.app](https://slice-js-docs.vercel.app/Documentation).
62
-
63
- Slice.js also provides an MCP server for programmatic documentation access:
64
-
65
- ```bash
66
- npx slicejs-mcp
67
- ```
68
-
69
- This allows AI assistants and tools to query, search, and retrieve Slice.js documentation.
70
-
71
- ## Project structure
72
-
73
- ```
74
- slice.js/
75
- ├── api/ # Framework API server
76
- ├── src/ # Runtime source code
77
- │ ├── App/ # Application engine
78
- │ ├── Components/# Component system
79
- │ └── ... # Routing, bundles, utilities
80
- ├── Slice/ # Visual component framework
81
- ├── types/ # TypeScript declarations
82
- └── docs/ # Contribution guides
83
- ```
84
-
85
- ## Contributing
86
-
87
- We welcome contributions. Please review the guidelines in [CONTRIBUTING.md](docs/CONTRIBUTING.md) before submitting changes.
88
-
89
- ## License
90
-
91
- Distributed under the MIT License. See `LICENSE` for more information.
92
-
93
- ## Contact
94
-
95
- Slice.js - [@VKneider](https://github.com/VKneider)
96
-
97
- Project Link: [https://github.com/VKneider/slice.js](https://github.com/VKneider/slice.js)
1
+ <div align="center">
2
+ <img src="readme_images/Slice.js-logo.svg" alt="Slice.js logo" width="150" />
3
+ <h1>Slice.js</h1>
4
+ <p>Component-Based Web Development Framework</p>
5
+ <p>
6
+ <a href="https://slice-js-docs.vercel.app/Documentation"><strong>Explore the docs »</strong></a>
7
+ <br />
8
+ <a href="https://slice-js-docs.vercel.app/">View Demo</a>
9
+ ·
10
+ <a href="https://github.com/VKneider/slice.js/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
11
+ ·
12
+ <a href="https://github.com/VKneider/slice.js/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
13
+ </p>
14
+ </div>
15
+
16
+ ## About this repository
17
+
18
+ This repository contains the core of the Slice.js framework: the component runtime, routing system, bundle engine, and framework API. It is the package published as `slicejs-web-framework` on npm.
19
+
20
+ ## Prerequisites
21
+
22
+ - Node.js >= 20
23
+ - npm or pnpm
24
+
25
+ ## Local development
26
+
27
+ 1. **Clone the repository**
28
+ ```bash
29
+ git clone https://github.com/VKneider/slice.js.git
30
+ cd slice.js
31
+ ```
32
+
33
+ 2. **Install dependencies**
34
+ ```bash
35
+ npm install
36
+ ```
37
+
38
+ 3. **Initialize a test project** (optional, for CLI-based development)
39
+ ```bash
40
+ npx slicejs-cli init
41
+ ```
42
+
43
+ 4. **Test changes locally**
44
+ ```bash
45
+ npx slicejs-cli dev
46
+ ```
47
+
48
+ ## Available commands
49
+
50
+ The framework does not expose commands directly. Use it through the CLI (`slicejs-cli`):
51
+
52
+ | Command | Description |
53
+ |---------|-------------|
54
+ | `npx slicejs-cli init` | Initialize a Slice.js project |
55
+ | `npx slicejs-cli dev` | Start development server |
56
+ | `npx slicejs-cli build` | Build for production |
57
+ | `npx slicejs-cli start` | Serve production build |
58
+
59
+ ## Documentation
60
+
61
+ Full documentation is available at [slice-js-docs.vercel.app](https://slice-js-docs.vercel.app/Documentation).
62
+
63
+ Slice.js also provides an MCP server for programmatic documentation access:
64
+
65
+ ```bash
66
+ npx slicejs-mcp
67
+ ```
68
+
69
+ This allows AI assistants and tools to query, search, and retrieve Slice.js documentation.
70
+
71
+ ## Project structure
72
+
73
+ ```
74
+ slice.js/
75
+ ├── api/ # Framework API server
76
+ ├── src/ # Runtime source code
77
+ │ ├── App/ # Application engine
78
+ │ ├── Components/# Component system
79
+ │ └── ... # Routing, bundles, utilities
80
+ ├── Slice/ # Visual component framework
81
+ ├── types/ # TypeScript declarations
82
+ └── docs/ # Contribution guides
83
+ ```
84
+
85
+ ## Contributing
86
+
87
+ We welcome contributions. Please review the guidelines in [CONTRIBUTING.md](docs/CONTRIBUTING.md) before submitting changes.
88
+
89
+ ## License
90
+
91
+ Distributed under the MIT License. See `LICENSE` for more information.
92
+
93
+ ## Contact
94
+
95
+ Slice.js - [@VKneider](https://github.com/VKneider)
96
+
97
+ Project Link: [https://github.com/VKneider/slice.js](https://github.com/VKneider/slice.js)