slicejs-web-framework 4.0.0 → 4.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 (70) hide show
  1. package/.opencode/opencode.json +14 -14
  2. package/LICENSE +21 -21
  3. package/README.md +97 -97
  4. package/Slice/Components/Structural/ContextManager/ContextManager.js +422 -422
  5. package/Slice/Components/Structural/ContextManager/ContextManagerDebugger.js +470 -470
  6. package/Slice/Components/Structural/Controller/Controller.js +1406 -1406
  7. package/Slice/Components/Structural/Controller/allowedValuesValidation.js +52 -52
  8. package/Slice/Components/Structural/Debugger/Debugger.html +72 -72
  9. package/Slice/Components/Structural/Debugger/Debugger.js +1505 -1505
  10. package/Slice/Components/Structural/EventManager/EventManager.js +651 -651
  11. package/Slice/Components/Structural/EventManager/EventManagerDebugger.js +985 -985
  12. package/Slice/Components/Structural/LeakInspector/LeakInspector.js +296 -296
  13. package/Slice/Components/Structural/Logger/Log.js +10 -10
  14. package/Slice/Components/Structural/Logger/LogViewer/LogViewer.js +662 -662
  15. package/Slice/Components/Structural/Logger/Logger.js +225 -225
  16. package/Slice/Components/Structural/Router/Router.js +793 -793
  17. package/Slice/Components/Structural/StylesManager/StylesManager.js +82 -82
  18. package/Slice/Components/Structural/StylesManager/ThemeManager/ThemeManager.js +162 -162
  19. package/Slice/Slice.js +686 -697
  20. package/Slice/tests/build-bundled-component-without-category.test.js +103 -103
  21. package/Slice/tests/build-js-only-visual-components.test.js +144 -144
  22. package/Slice/tests/build-singleton.test.js +244 -244
  23. package/Slice/tests/bundle-v2-runtime-contract.test.js +738 -738
  24. package/Slice/tests/context-patch-use.test.js +95 -95
  25. package/Slice/tests/destroy-cascade.test.js +215 -215
  26. package/Slice/tests/event-emitters.test.js +79 -79
  27. package/Slice/tests/event-registry.test.js +141 -141
  28. package/Slice/tests/fixtures/real-runtime-loader.mjs +21 -21
  29. package/Slice/tests/leak-orphans.test.js +131 -131
  30. package/Slice/tests/props-allowed-values-validation.test.js +119 -119
  31. package/Slice/tests/public-env-runtime-accessors.test.js +44 -44
  32. package/Slice/tests/public-env-typed-accessors.test.js +66 -66
  33. package/Slice/tests/router-loading-finally.test.js +68 -68
  34. package/api/framework/devDepsOptimizer.js +335 -335
  35. package/api/framework/express.js +3 -3
  36. package/api/framework/precompressedStatic.js +93 -93
  37. package/api/framework/publicEnvResolver.js +123 -123
  38. package/api/framework/securityMiddleware.js +197 -197
  39. package/api/framework/server.js +411 -411
  40. package/api/index.js +7 -7
  41. package/api/tests/dev-deps-optimizer.test.js +137 -137
  42. package/api/tests/dev-server-external.test.js +56 -56
  43. package/api/tests/precompressed-static.test.js +119 -119
  44. package/api/tests/public-env-resolver.test.js +193 -193
  45. package/package.json +49 -49
  46. package/sliceConfig.schema.json +122 -122
  47. package/src/App/index.html +69 -69
  48. package/src/App/index.js +20 -20
  49. package/src/App/style.css +11 -11
  50. package/src/Components/AppComponents/AboutSection/AboutSection.css +9 -9
  51. package/src/Components/AppComponents/AboutSection/AboutSection.html +8 -8
  52. package/src/Components/AppComponents/AboutSection/AboutSection.js +12 -12
  53. package/src/Components/AppComponents/AppShell/AppShell.css +10 -10
  54. package/src/Components/AppComponents/AppShell/AppShell.html +4 -4
  55. package/src/Components/AppComponents/AppShell/AppShell.js +36 -36
  56. package/src/Components/AppComponents/HomeSection/HomeSection.css +20 -20
  57. package/src/Components/AppComponents/HomeSection/HomeSection.html +10 -10
  58. package/src/Components/AppComponents/HomeSection/HomeSection.js +19 -19
  59. package/src/Components/components.js +8 -8
  60. package/src/public/Styles/sliceStyles.css +34 -34
  61. package/src/public/Themes/Dark.css +42 -42
  62. package/src/public/Themes/Light.css +31 -31
  63. package/src/public/Themes/Slice.css +47 -47
  64. package/src/public/manifest.json +15 -15
  65. package/src/public/robots.txt +4 -4
  66. package/src/public/sitemap.xml +8 -8
  67. package/src/routes.js +9 -9
  68. package/src/sliceConfig.json +72 -72
  69. package/tests/router-emit-ordering.test.js +63 -63
  70. package/types/index.d.ts +219 -219
@@ -1,15 +1,15 @@
1
- {
2
- "$schema": "https://opencode.ai/config.json",
3
- "mcp": {
4
- "thinking": {
5
- "type": "local",
6
- "command": ["npx", "-y", "@modelcontextprotocol/server-sequential-thinking"],
7
- "enabled": true
8
- },
9
- "slicemcp": {
10
- "type": "local",
11
- "command": ["npx", "-y", "slicejs-mcp"],
12
- "enabled": true
13
- }
14
- }
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+ "mcp": {
4
+ "thinking": {
5
+ "type": "local",
6
+ "command": ["npx", "-y", "@modelcontextprotocol/server-sequential-thinking"],
7
+ "enabled": true
8
+ },
9
+ "slicemcp": {
10
+ "type": "local",
11
+ "command": ["npx", "-y", "slicejs-mcp"],
12
+ "enabled": true
13
+ }
14
+ }
15
15
  }
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)