plug-code 2.0.1 → 2.3.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.
Files changed (85) hide show
  1. package/LICENSE +11 -5
  2. package/README.md +298 -100
  3. package/dist/core/helpers/core.d.ts +1 -0
  4. package/dist/core/helpers/core.d.ts.map +1 -0
  5. package/dist/core/helpers/core.js +1 -0
  6. package/dist/core/helpers/core.js.map +1 -0
  7. package/dist/core/hooks/plcHooks.d.ts +1 -0
  8. package/dist/core/hooks/plcHooks.d.ts.map +1 -0
  9. package/dist/core/hooks/plcHooks.js +1 -0
  10. package/dist/core/hooks/plcHooks.js.map +1 -0
  11. package/dist/core/plcAPI.d.ts +4 -3
  12. package/dist/core/plcAPI.d.ts.map +1 -0
  13. package/dist/core/plcAPI.js +39 -16
  14. package/dist/core/plcAPI.js.map +1 -0
  15. package/dist/core/plcPipeline.d.ts +1 -0
  16. package/dist/core/plcPipeline.d.ts.map +1 -0
  17. package/dist/core/plcPipeline.js +1 -0
  18. package/dist/core/plcPipeline.js.map +1 -0
  19. package/dist/core/plcScheduler.d.ts +1 -0
  20. package/dist/core/plcScheduler.d.ts.map +1 -0
  21. package/dist/core/plcScheduler.js +1 -0
  22. package/dist/core/plcScheduler.js.map +1 -0
  23. package/dist/core/plcStore.d.ts +1 -0
  24. package/dist/core/plcStore.d.ts.map +1 -0
  25. package/dist/core/plcStore.js +1 -0
  26. package/dist/core/plcStore.js.map +1 -0
  27. package/dist/core/ui/plcCore.d.ts +1 -0
  28. package/dist/core/ui/plcCore.d.ts.map +1 -0
  29. package/dist/core/ui/plcCore.js +1 -0
  30. package/dist/core/ui/plcCore.js.map +1 -0
  31. package/dist/core/ui/plcErrorBoundary.d.ts +1 -0
  32. package/dist/core/ui/plcErrorBoundary.d.ts.map +1 -0
  33. package/dist/core/ui/plcErrorBoundary.js +1 -0
  34. package/dist/core/ui/plcErrorBoundary.js.map +1 -0
  35. package/dist/core/ui/plcInspector.d.ts +1 -0
  36. package/dist/core/ui/plcInspector.d.ts.map +1 -0
  37. package/dist/core/ui/plcInspector.js +1 -0
  38. package/dist/core/ui/plcInspector.js.map +1 -0
  39. package/dist/core/ui/plcLayout.d.ts +1 -0
  40. package/dist/core/ui/plcLayout.d.ts.map +1 -0
  41. package/dist/core/ui/plcLayout.js +3 -1
  42. package/dist/core/ui/plcLayout.js.map +1 -0
  43. package/dist/core/ui/plcSlotRenderer.d.ts +7 -0
  44. package/dist/core/ui/plcSlotRenderer.d.ts.map +1 -0
  45. package/dist/core/ui/plcSlotRenderer.js +11 -0
  46. package/dist/core/ui/plcSlotRenderer.js.map +1 -0
  47. package/dist/core.d.ts +21 -0
  48. package/dist/core.d.ts.map +1 -0
  49. package/dist/core.js +32 -0
  50. package/dist/core.js.map +1 -0
  51. package/dist/index.d.ts +3 -8
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +2 -8
  54. package/dist/index.js.map +1 -0
  55. package/dist/simple.d.ts +42 -0
  56. package/dist/simple.d.ts.map +1 -0
  57. package/dist/simple.js +88 -0
  58. package/dist/simple.js.map +1 -0
  59. package/dist/types/core/api.d.ts +1 -0
  60. package/dist/types/core/api.d.ts.map +1 -0
  61. package/dist/types/core/api.js +1 -0
  62. package/dist/types/core/api.js.map +1 -0
  63. package/dist/types/core/general.d.ts +2 -2
  64. package/dist/types/core/general.d.ts.map +1 -0
  65. package/dist/types/core/general.js +1 -0
  66. package/dist/types/core/general.js.map +1 -0
  67. package/dist/types/core/index.d.ts +2 -0
  68. package/dist/types/core/index.d.ts.map +1 -0
  69. package/dist/types/core/index.js +2 -0
  70. package/dist/types/core/index.js.map +1 -0
  71. package/dist/types/core/ui.d.ts +1 -0
  72. package/dist/types/core/ui.d.ts.map +1 -0
  73. package/dist/types/core/ui.js +1 -0
  74. package/dist/types/core/ui.js.map +1 -0
  75. package/dist/types/core.d.ts +45 -0
  76. package/dist/types/core.d.ts.map +1 -0
  77. package/dist/types/core.js +2 -0
  78. package/dist/types/core.js.map +1 -0
  79. package/dist/types/index.d.ts +4 -0
  80. package/dist/types/index.js +4 -0
  81. package/dist/types/registry.d.ts +1 -0
  82. package/dist/types/registry.d.ts.map +1 -0
  83. package/dist/types/registry.js +1 -0
  84. package/dist/types/registry.js.map +1 -0
  85. package/package.json +27 -3
package/LICENSE CHANGED
@@ -4,14 +4,20 @@ Copyright (c) 2026 AlaunS
4
4
 
5
5
  All rights reserved.
6
6
 
7
- Permission is hereby granted to use this software for personal and commercial projects.
8
- You may modify the software for your own internal use.
7
+ 1. GRANT OF LICENSE
8
+ Permission is hereby granted to use this software for personal and commercial projects.
9
+ You may modify the software for your own internal use and include compiled versions
10
+ of this software within your own applications.
9
11
 
12
+ 2. RESTRICTIONS
10
13
  You may NOT:
11
- - Redistribute this software or any modified version of it.
12
- - Sell, sublicense, publish, or share this software.
13
- - Use this software as the basis for another framework, library, or competing product.
14
+ - Redistribute, sell, sublicense, or share this software in its source code form
15
+ or as a standalone library/package.
16
+ - Use this software, in whole or in part, as the basis for creating another framework,
17
+ library, SDK, or competing development tool.
18
+ - Reverse engineer, decompile, or disassemble the software to create a derivative product.
14
19
 
20
+ 3. DISCLAIMER
15
21
  This software is provided "as is", without warranty of any kind, express or implied,
16
22
  including but not limited to the warranties of merchantability, fitness for a
17
23
  particular purpose and noninfringement. In no event shall the author be liable
package/README.md CHANGED
@@ -1,100 +1,200 @@
1
+ # 🔌 Plug&Code (v2.1.2)
1
2
 
2
- # 🔌 Plug&Code (v2)
3
+ **Plug&Code** is a **high-performance**, strongly-typed, **modular React framework**. It decouples **logic**, **UI**, and **data** via a **Feature-based architecture**.
3
4
 
4
- [![NPM Version](https://img.shields.io/npm/v/plug-code?color=blue)](https://www.npmjs.com/package/plug-code)
5
- [![License](https://img.shields.io/npm/l/plug-code?color=green)](LICENSE)
6
- [![TypeScript](https://img.shields.io/badge/TypeScript-4.9-blue)](https://www.typescriptlang.org/)
7
-
8
- **Plug&Code** is a **high-performance**, strongly-typed, **modular React framework**.
9
- It’s designed for complex enterprise apps (Dashboards, CRMs, ERPs), decoupling **logic**, **UI**, and **data** via a **Feature-based architecture**.
10
-
11
- > **v2 Highlights:** Full TypeScript support (Generics & Registry Pattern), native virtualization, immutable state management with Immer, and lazy-loaded modules.
5
+ > **New in v2.1.2:** Choose your path! Start instantly with **Simple Mode** (Zero Config) or scale massively with **Enterprise Mode** (Schema-Based).
12
6
 
13
7
  ---
14
8
 
15
9
  ## 🚀 Key Features
16
10
 
17
- - 🛡️ **Strong Typing:** Autocomplete and type inference in **Stores**, **Commands**, and **Slots** via the Registry pattern.
18
- - 🧩 **Feature-First Architecture:** Organize code in portable `ModuleManifests` that encapsulate **state**, **logic**, and **UI**.
19
- - **Native Performance:** Built-in virtual rendering (`markVirtual`) and priority management via **Scheduler**.
20
- - 🧠 **Reactive State Machine:** Global & module-level state with **Immer** and granular subscriptions.
21
- - 🎨 **UI Composition Pipeline:** Slots system with **multiple injections**, **priorities**, and **keepAlive** support.
11
+ * **🛡️ Dual Mode:**
12
+ * **Simple:** Zero-boilerplate, inferred types, ideal for MVPs.
13
+ * **Enterprise:** Schema-first, strict contracts, Registry Pattern for large teams.
14
+
15
+
16
+ * **🧩 Feature-First Architecture:** Organize code in portable `ModuleManifests` that encapsulate state, logic, and UI.
17
+ * **⚡ Native Performance:** Built-in virtual rendering (`markVirtual`) and priority management via **Scheduler**.
18
+ * **🧠 Reactive State Machine:** Global & module-level state with **Immer** and granular subscriptions.
19
+ * **🎨 UI Composition Pipeline:** Slots system with **multiple injections**, **priorities**, and **keepAlive** support.
20
+ * **🛡️ Crash-Proof Slots:** Built-in **Error Boundaries** isolate every injected component. If one module crashes, the rest of the application stays alive.
22
21
 
23
22
  ---
24
23
 
25
24
  ## 📦 Installation
26
25
 
27
- <details>
28
- <summary>Click to expand</summary>
29
-
30
26
  ```bash
31
27
  npm install plug-code immer
32
28
  # or
33
29
  yarn add plug-code immer
34
- ````
35
30
 
36
- </details>
31
+ ```
37
32
 
38
33
  ---
39
34
 
40
- ## 🛡️ The Type Contract (Registry)
35
+ ## Mode A: Simple Mode (Zero Config)
41
36
 
42
- Plug&Code requires defining the **shape of your app** in a central registry file, enabling **IntelliSense** everywhere.
37
+ Perfect for prototypes, small apps, or when you just need clean state management without complex architecture. Import from `plug-code/simple`.
43
38
 
44
- <details>
45
- <summary>Example: types/registry.ts</summary>
39
+ ### 1️⃣ Setup Store & Actions
46
40
 
47
- ```ts
48
- export type User = { id: string; name: string };
41
+ Use `createSimplePlugC` to define your state. Types are inferred automatically from your initial state.
49
42
 
50
- // 1. App State
51
- export interface RootStoreRegistry {
52
- "users:list": User[];
53
- "app:loading": boolean;
54
- }
43
+ ```tsx
44
+ // store.ts
45
+ import { createSimplePlugC } from 'plug-code/simple';
55
46
 
56
- // 2. Commands (Payload -> Result)
57
- export interface CommandRegistry {
58
- "users:add": { payload: User; result: void };
59
- "users:delete": { payload: { id: string }; result: boolean };
60
- }
47
+ export const { Provider, useStore, useAction, createModule } = createSimplePlugC({
48
+ initialState: {
49
+ count: 0,
50
+ user: { name: "Guest", loggedIn: false }
51
+ },
52
+ actions: {
53
+ // Direct mutable updates with Immer draft
54
+ increment: (draft) => { draft.count++ },
55
+ login: (draft, name: string) => {
56
+ draft.user.name = name;
57
+ draft.user.loggedIn = true;
58
+ },
59
+ // Async actions supported
60
+ fetchData: async (draft) => {
61
+ // ... logic
62
+ }
63
+ },
64
+ options: { debug: true }
65
+ });
61
66
 
62
- // 3. UI Slots
63
- export interface SlotRegistry {
64
- "main-layout": {};
65
- "sidebar": { collapsed: boolean };
66
- }
67
+ ```
68
+
69
+ ### 2️⃣ Use in Components
70
+
71
+ ```tsx
72
+ // App.tsx
73
+ import { Provider, useStore, useAction } from './store';
74
+
75
+ const Counter = () => {
76
+ const count = useStore(s => s.count); // Auto-typed as number
77
+ const increment = useAction("increment");
67
78
 
68
- // 4. Feature State
69
- export interface FeatureRegistry {
70
- "auth": { token: string | null };
79
+ return <button onClick={() => increment()}>Count: {count}</button>;
71
80
  }
81
+
82
+ export default () => (
83
+ <Provider>
84
+ <Counter />
85
+ </Provider>
86
+ );
87
+
72
88
  ```
73
89
 
74
- </details>
90
+ ### 3️⃣ Modular Modules (The "Plug" Concept)
91
+
92
+ Need to encapsulate a module? Use `createModule` (returned from your store setup) to bundle State, View, and Logic into a portable unit.
93
+
94
+ ```tsx
95
+ // modules/ChatFeature.tsx
96
+ import { createModule } from '../store'; // Import from YOUR store
97
+
98
+ export const ChatFeature = createModule({
99
+ name: 'chat',
100
+ state: { messages: [] as string[] },
101
+ actions: {
102
+ // Arguments: (draft, payload, rootActions)
103
+ send: (draft, msg: string, root) => {
104
+ draft.messages.push(msg);
105
+ // You can even call root actions here:
106
+ // root.increment();
107
+ }
108
+ },
109
+ // Optional: Define a default View
110
+ view: ({ state, actions }) => (
111
+ <div>
112
+ {state.messages.map(m => <div key={m}>{m}</div>)}
113
+ <button onClick={() => actions.send("Hello!")}>Send</button>
114
+ </div>
115
+ )
116
+ });
117
+
118
+ // Usage inside App.tsx:
119
+ // <ChatFeature.View />
120
+
121
+ ```
75
122
 
76
123
  ---
77
124
 
78
- ## 🚀 Quick Start
125
+ ## 🛡️ Mode B: Enterprise Mode (Schema-Based)
126
+
127
+ For complex Dashboards, ERPs, or large teams. Define a strict **Schema Contract** to enforce architecture across the entire application.
128
+
129
+ ### 1️⃣ The Type Schema
130
+
131
+ Define the shape of your application in a TypeScript object type.
132
+
133
+ ```ts
134
+ // types/AppSchema.ts
135
+ export type AppSchema = {
136
+ // 1. App State
137
+ store: {
138
+ "users:list": { id: string; name: string }[];
139
+ "app:loading": boolean;
140
+ };
141
+
142
+ // 2. Commands (Payload -> Result)
143
+ commands: {
144
+ "users:delete": { payload: { id: string }; result: boolean };
145
+ "data:fetch": { payload: void; result: void };
146
+ };
79
147
 
80
- ### 1️⃣ Create a Feature Module
148
+ // 3. UI Slots (Props)
149
+ slots: {
150
+ "main-layout": {};
151
+ "sidebar": { collapsed: boolean };
152
+ };
153
+ };
81
154
 
82
- <details>
83
- <summary>Example: UsersFeature</summary>
155
+ ```
156
+
157
+ ### 2️⃣ Initialize the System
158
+
159
+ Pass your Schema to the factory. This returns **strongly-typed hooks** bound to your specific definitions.
84
160
 
85
161
  ```ts
162
+ // system.ts
163
+ import { createPlugC } from 'plug-code';
164
+ import type { AppSchema } from './types/AppSchema';
165
+
166
+ // ✨ MAGIC HAPPENS HERE: We pass the Schema to the factory
167
+ export const {
168
+ api,
169
+ SystemPlcRoot,
170
+ useStore,
171
+ useCommand,
172
+ useSlot
173
+ } = createPlugC<AppSchema>();
174
+
175
+ ```
176
+
177
+ ### 3️⃣ Create a Feature Module
178
+
179
+ Modules use the typed hooks generated in the previous step.
180
+
181
+ ```tsx
182
+ // modules/UsersFeature.tsx
86
183
  import { ModuleManifest } from 'plug-code';
87
- import { useCommand, useStore } from '../framework/plcHooks';
184
+ import { useStore, useCommand } from '../system'; // Import YOUR typed hooks
88
185
 
89
186
  const UserList = () => {
90
- const users = useStore("users:list", s => s);
187
+ // TS knows "users:list" returns User[] automatically
188
+ const users = useStore("users:list");
91
189
  const deleteCmd = useCommand("users:delete");
92
190
 
93
191
  return (
94
192
  <ul>
95
193
  {users.map(u => (
96
194
  <li key={u.id}>
97
- {u.name} <button onClick={() => deleteCmd({ id: u.id })}>x</button>
195
+ {u.name}
196
+ {/* TS enforces payload { id: string } */}
197
+ <button onClick={() => deleteCmd({ id: u.id })}>x</button>
98
198
  </li>
99
199
  ))}
100
200
  </ul>
@@ -105,88 +205,186 @@ export const UsersFeature: ModuleManifest = {
105
205
  name: "users",
106
206
  state: { "users:list": [] },
107
207
  commands: {
108
- "users:delete": ({ id }) => {
109
- console.log("Deleting", id);
110
- return true;
111
- }
208
+ "users:delete": ({ id }) => { console.log("Deleting", id); return true; }
112
209
  },
113
210
  slots: {
114
211
  "main-layout": [{ id: "user-list-view", component: UserList, priority: 10 }]
115
212
  },
116
- onLoad: (api) => {
213
+ onLoad: () => {
214
+ // Enable virtualization for large lists (10k+ items)
117
215
  api.markVirtual("main-layout", { itemHeight: 50 });
118
216
  }
119
217
  };
218
+
120
219
  ```
121
220
 
122
- </details>
221
+ ### 4️⃣ Register & Render
222
+
223
+ Connect your modules to the main application using `api.registerModule`.
224
+
225
+ ```tsx
226
+ // App.tsx
227
+ import React from 'react';
228
+ import { api, SystemPlcRoot } from './system'; // Singleton created in Step 2
229
+ import { UsersFeature } from './modules/UsersFeature';
230
+
231
+ // 🔌 Load the Feature into the runtime
232
+ // This initializes state, registers commands, and injects the UI into 'main-layout'
233
+ api.registerModule(UsersFeature);
234
+
235
+ export const App = () => {
236
+ return (
237
+ <SystemPlcRoot>
238
+ <div className="layout-container">
239
+ <h1>My Dashboard</h1>
240
+
241
+ {/* Render the slot where UsersFeature injected its component */}
242
+ <div className="content">
243
+ {api.render("main-layout")}
244
+ </div>
245
+ </div>
246
+ </SystemPlcRoot>
247
+ );
248
+ };
249
+
250
+ ```
123
251
 
124
252
  ---
125
253
 
126
- ### 2️⃣ Initialize the System
254
+ ## 📚 API Reference
127
255
 
128
- <details>
129
- <summary>Example: main.tsx</summary>
256
+ Regardless of the mode, the `api` object exposes the full power of the Plug&Code runtime.
130
257
 
131
- ```ts
132
- import { PlcStore, PlcAPI, PlcProvider } from 'plug-code';
133
- import { UsersFeature } from './features/UsersFeature';
258
+ ### 🧬 Root State Management
134
259
 
135
- const store = new PlcStore();
136
- const api = new PlcAPI(store);
260
+ * **`createStore<K>(key, initial)`**
261
+ Initializes a key in the root store.
262
+ * **`getStore<K>(key)`**
263
+ Returns the current snapshot of a value in the root store.
264
+ * **`setStore<K>(key, updater, priority?, useTransition?)`**
265
+ Updates the state.
266
+ * `updater`: Can be a raw value or a callback `(draft) => void` (using **Immer**).
267
+ * `priority`: Execution priority (`HIGH`, `MED`, `LOW`).
268
+ * `useTransition`: Wraps the update in a React transition for concurrent mode.
137
269
 
138
- api.registerModule(UsersFeature);
139
270
 
140
- const App = () => (
141
- <PlcProvider api={api}>
142
- <div className="app">
143
- {api.render("main-layout")}
144
- </div>
145
- </PlcProvider>
146
- );
271
+
272
+ ### 📦 Feature State (Substores)
273
+
274
+ Methods to manage isolated state within modules (e.g., `"users:list"`).
275
+
276
+ * **`createSubstore<F, K>(substore, key, initial)`**
277
+ Initializes a specific key within a module namespace.
278
+ * **`getSubstore<F, K>(substore, key)`**
279
+ Gets a value from a module substore.
280
+ * **`setSubstore<F, K>(substore, key, updater, ...)`**
281
+ Updates a value in a module substore using Immer drafts.
282
+
283
+ ### 🧠 Reactivity & Computed Values
284
+
285
+ * **`deriveStore(outputKey, outputSlot, dependencies, calculator)`**
286
+ Creates a **computed value** that automatically updates when dependencies change.
287
+ * **`deriveSubstore(substore, outputKey, outputSlot, dependencies, calculator)`**
288
+ Same as `deriveStore` but scoped to a specific module substore.
289
+ * **`watch(key, selector, callback)`**
290
+ Subscribes to changes in any store/substore key. Useful for side effects (logging, analytics).
291
+ * **`watchAllStores(definitions, callback)`**
292
+ Watches multiple keys across different stores/substores and triggers a callback when the combined state changes.
293
+
294
+ ### ⚡ Logic & Commands
295
+
296
+ * **`registerCommand(id, fn)`**
297
+ Registers a global executable action.
298
+ * **`execute(id, payload)`**
299
+ Executes a registered command. Returns a typed `Promise`.
300
+ * **`wrapCommand(id, middleware)`**
301
+ Wraps an existing command with middleware (e.g., for validation or logging) without modifying the original logic.
302
+
303
+ ### 🎨 UI Composition & Layout
304
+
305
+ * **`register(slot, id, component, priority, keepAlive)`**
306
+ Injects a React component into a UI Slot.
307
+ * `priority`: Higher numbers render first.
308
+ * `keepAlive`: If `true`, the DOM node is preserved (hidden) when removed from the view.
309
+
310
+
311
+ * **`render(slot, props)`**
312
+ Renders the content of a slot.
313
+ * **`wrap(slot, wrapper)`**
314
+ Applies a "Middleware Component" to an entire slot. Useful for injecting **Theme Providers**, **Suspense Boundaries**, or **Security Contexts** around a group of plugins.
315
+ ```tsx
316
+ // Example: Wrap the entire dashboard sidebar in a ThemeProvider
317
+ api.wrap("sidebar", (children) => (
318
+ <ThemeProvider theme={darkTheme}>
319
+ {children}
320
+ </ThemeProvider>
321
+ ));
322
+
147
323
  ```
148
324
 
149
- </details>
325
+
326
+ * **`after(slot, targetId, newId, component)`**
327
+ Injects a component immediately after a specific target ID within a slot.
328
+ * **`markVirtual(slot, config)`**
329
+ **High-Performance Mode:** Transforms the slot into a virtualized list.
330
+ * `config`: `{ itemHeight: number, overscan?: number }`.
331
+
332
+
333
+ * **`redraw(keyOrSlot)`**
334
+ Forces a re-render of a specific slot or store subscriber.
335
+ * **`connect(renderFn, dependencies)`**
336
+ HOC (Higher-Order Component) that connects a raw component to the store.
337
+
338
+ ### 🔄 Data Pipeline (Transforms)
339
+
340
+ * **`makeTransform<T>(channel, id, fn, priority)`**
341
+ Registers a step in a data processing pipeline.
342
+ * **`getTransform<T>(channel, initialData, context)`**
343
+ Runs a pipeline asynchronously and returns the result. Caches results based on input equality.
344
+ * **`receive(channel, initialData, context)`**
345
+ Runs a synchronous pipeline. Throws if the pipeline contains async steps.
346
+
347
+ ### 🧩 Modules & Lifecycle
348
+
349
+ * **`registerModule(manifest)`**
350
+ Loads a `ModuleManifest` (State, UI, Commands) into the runtime.
351
+ * **`loadFeature(importer)`**
352
+ Helper for lazy-loading modules (e.g., `() => import('./modules/MyFeature')`).
353
+ * **`createSelector(extractor, calculator)`**
354
+ Creates a memoized selector for use with hooks or watchers.
150
355
 
151
356
  ---
152
357
 
153
- ## 📚 API Reference
358
+ ## 🛡️ Safety & Reliability
154
359
 
155
- ### 🧬 State Management (`api`)
360
+ Plug&Code is built for stability. In large modular applications, a single buggy plugin shouldn't take down the entire dashboard.
156
361
 
157
- * `createStore<K>(key, initial)`: Initialize a key in the root store.
158
- * `setStore<K>(key, updater, priority?, useTransition?)`: Update state using **Immer**. Supports React 18 concurrency.
159
- * `getStore<K>(key)`: Get a snapshot of the state.
160
- * `watch<K>(key, selector, callback)`: Listen to reactive changes outside components.
362
+ ### 🛑 Automatic Error Boundaries
161
363
 
162
- ### 🎨 UI & Layout (`api.layout`)
364
+ Every component injected into a Slot is automatically wrapped in a `SlotErrorBoundary`.
163
365
 
164
- * `register(slot, id, component, priority, keepAlive)`: Inject a component in a slot.
366
+ * **Isolation:** If a module throws an error during render, only that specific slot item is replaced with a fallback error UI.
367
+ * **Logging:** Errors are caught and logged automatically, making debugging modular systems easier.
165
368
 
166
- * `priority`: higher number = higher placement.
167
- * `keepAlive`: keeps the component in memory (hidden DOM) between view changes.
168
- * `render(slot, props)`: Render slot content.
169
- * `markVirtual(slot, config)`: Transform a slot into a **high-performance virtual list** (supports 10k+ items).
369
+ ### 🚦 Concurrent Mode & Scheduler
170
370
 
171
- ### 🧠 Logic & Commands
371
+ The framework manages updates using an internal **Priority Scheduler** fully compatible with **React 18**.
172
372
 
173
- * `registerCommand(id, fn)`: Register a global command.
174
- * `execute(id, payload)`: Execute a command and return a typed Promise.
175
- * `wrapCommand(id, middleware)`: Intercept commands (logging, confirmation, etc).
373
+ * **Updates:** `setStore` supports `useTransition: true` to keep the UI responsive during heavy state updates.
374
+ * **Priorities:** You can schedule updates as `HIGH` (immediate interaction), `MED` (default), or `LOW` (background sync) to prevent frame drops.
176
375
 
177
- ### ⚛️ React Hooks
376
+ ---
178
377
 
179
- * `useStore(key, selector)`: Reactive, selective state subscription.
180
- * `useCommand(id)`: Get an executable command function.
181
- * `useSlot(slot)`: Render a slot dynamically.
378
+ ## Performance Internals
379
+
380
+ * **Virtualization:** `api.markVirtual` isn't just a helper; it swaps the rendering engine for that slot to a windowing system capable of handling **10,000+ items** with consistent frame rates.
381
+ * **Smart caching:** The `deriveStore` and pipeline `transform` systems use **Dependency Tracking** to only re-calculate when specific used keys change, avoiding zombie-child re-renders.
182
382
 
183
383
  ---
184
384
 
185
- ## 🌟 Best Practices
385
+ ## 🌟 Best Practices (Enterprise Mode)
186
386
 
187
- * **Define types first:** Everything starts in `registry.ts`.
188
- * **Atomic Features:** A feature should contain all it needs (Store, UI, Commands).
387
+ * **Schema First:** Define your data shape in `AppSchema` before coding.
388
+ * **Atomic Modules:** A module should contain all it needs (Store, UI, Commands).
189
389
  * **Data-Driven UI:** Change the store, let watchers/hooks update the view.
190
- * **Use Virtualization:** For large or growing lists, call `api.markVirtual` in `onLoad`.
191
-
192
- ---
390
+ * **Use Virtualization:** For large or growing lists, simply call `api.markVirtual` in `onLoad`.
@@ -1,2 +1,3 @@
1
1
  export declare function isEqual(a: any, b: any): boolean;
2
2
  export declare function shallowCompare(obj1: any, obj2: any): boolean;
3
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/core.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,OAAO,CAW/C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAU5D"}
@@ -30,3 +30,4 @@ export function shallowCompare(obj1, obj2) {
30
30
  }
31
31
  return true;
32
32
  }
33
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/core/helpers/core.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,OAAO,CAAC,CAAM,EAAE,CAAM;IAClC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACzB,IAAI,OAAO,CAAC,KAAK,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACpD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7B,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAChD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAS,EAAE,IAAS;IAC/C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACjC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAChD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACtB,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;IAC9C,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -13,3 +13,4 @@ export declare function useSlot<K extends SlotKey>(slotName: K): (props?: SlotPr
13
13
  export declare function useTransientStore<K extends StoreKey, T>(key: K, selector: (state: StoreValue<K>) => T, effect: (value: T) => void, deps?: any[]): void;
14
14
  export declare function useTransientStore<F extends FeatureKey, K extends keyof SafeFeatureValue<F, K> & string, T>(key: `${F}:${K}`, selector: (state: SafeFeatureValue<F, K>) => T, effect: (value: T) => void, deps?: any[]): void;
15
15
  export {};
16
+ //# sourceMappingURL=plcHooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plcHooks.d.ts","sourceRoot":"","sources":["../../../src/core/hooks/plcHooks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAk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,SAAS,CAAC,CAAC,CAAC,CAAC,CAG9D;AAED,wBAAgB,OAAO,CAAC,CAAC,SAAS,OAAO,EAAE,QAAQ,EAAE,CAAC,IAE1C,QAAQ,SAAS,CAAC,CAAC,CAAC,qBAC/B;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,EACnD,GAAG,EAAE,CAAC,EACN,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EACrC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC1B,IAAI,CAAC,EAAE,GAAG,EAAE,GACb,IAAI,CAAC;AAER,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,MAAM,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,EACtG,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,EAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAC9C,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC1B,IAAI,CAAC,EAAE,GAAG,EAAE,GACb,IAAI,CAAC"}
@@ -45,3 +45,4 @@ export function useTransientStore(key, selector, effect, deps = []) {
45
45
  return unsubscribe;
46
46
  }, [api, key, ...deps]);
47
47
  }
48
+ //# sourceMappingURL=plcHooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plcHooks.js","sourceRoot":"","sources":["../../../src/core/hooks/plcHooks.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAmBvF,MAAM,UAAU,GAAG,aAAa,CAAgB,IAAI,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,WAAW,GAAyD,CAAC,EAAE,GAA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AE,CAAC;IACxB,OAAO,OAAO,CAAC,GAAG,EAAE;QAChB,OAAO,CAAC,OAAuB,EAAyB,EAAE,CACtD,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,OAAO,CAAoB,QAAW;IAClD,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IACxB,OAAO,CAAC,KAAoB,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AACjE,CAAC;AAgBD,MAAM,UAAU,iBAAiB,CAC7B,GAAW,EACX,QAA2B,EAC3B,MAA0B,EAC1B,OAAc,EAAE;IAEhB,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IAExB,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;YACtD,MAAM,CAAC,QAAQ,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,OAAO,WAAW,CAAC;IACvB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;AAC5B,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
2
  import { CommandFn } from "../types/core/api";
3
3
  import { ModuleManifest } from "../types/core/general";
4
- import { PlcStore } from "./plcStore";
5
4
  import { Priority } from "./plcScheduler";
6
5
  import { Draft } from "immer";
7
6
  import { PlcLayout } from "./ui/plcLayout";
@@ -20,11 +19,12 @@ export declare class PlcAPI {
20
19
  private scheduler;
21
20
  layout: PlcLayout;
22
21
  private compiledPipelines;
22
+ private moduleAssets;
23
23
  private receiveCache;
24
24
  private commands;
25
25
  private activeDependencyTracker;
26
- private loadedFeatures;
27
- constructor(store: PlcStore);
26
+ private loadedModules;
27
+ constructor();
28
28
  createStore<K extends StoreKey>(key: K, initial: StoreValue<K>): void;
29
29
  getStore<K extends StoreKey>(key: K): StoreValue<K>;
30
30
  setStore<K extends StoreKey>(key: K, updater: StoreValue<K> | ((draft: Draft<StoreValue<K>>) => void | StoreValue<K>), priority?: Priority, useTransition?: boolean): void;
@@ -81,3 +81,4 @@ export declare class PlcAPI {
81
81
  createSelector<S, R>(extractor: (state: S) => any[], calculator: (...args: any[]) => R): (state: S) => R;
82
82
  }
83
83
  export {};
84
+ //# sourceMappingURL=plcAPI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plcAPI.d.ts","sourceRoot":"","sources":["../../src/core/plcAPI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAmC,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAc,MAAM,uBAAuB,CAAA;AAGlE,OAAO,EAAE,QAAQ,EAAa,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EACH,eAAe,EACf,eAAe,EACf,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACZ,MAAM,mBAAmB,CAAC;AAS3B,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,eAAe,GAClD,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,IAAI,CAAC,GAC5D,GAAG,CAAC;AAEV,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,eAAe,GACjD,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS;IAAE,MAAM,EA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