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.
- package/LICENSE +11 -5
- package/README.md +298 -100
- package/dist/core/helpers/core.d.ts +1 -0
- package/dist/core/helpers/core.d.ts.map +1 -0
- package/dist/core/helpers/core.js +1 -0
- package/dist/core/helpers/core.js.map +1 -0
- package/dist/core/hooks/plcHooks.d.ts +1 -0
- package/dist/core/hooks/plcHooks.d.ts.map +1 -0
- package/dist/core/hooks/plcHooks.js +1 -0
- package/dist/core/hooks/plcHooks.js.map +1 -0
- package/dist/core/plcAPI.d.ts +4 -3
- package/dist/core/plcAPI.d.ts.map +1 -0
- package/dist/core/plcAPI.js +39 -16
- package/dist/core/plcAPI.js.map +1 -0
- package/dist/core/plcPipeline.d.ts +1 -0
- package/dist/core/plcPipeline.d.ts.map +1 -0
- package/dist/core/plcPipeline.js +1 -0
- package/dist/core/plcPipeline.js.map +1 -0
- package/dist/core/plcScheduler.d.ts +1 -0
- package/dist/core/plcScheduler.d.ts.map +1 -0
- package/dist/core/plcScheduler.js +1 -0
- package/dist/core/plcScheduler.js.map +1 -0
- package/dist/core/plcStore.d.ts +1 -0
- package/dist/core/plcStore.d.ts.map +1 -0
- package/dist/core/plcStore.js +1 -0
- package/dist/core/plcStore.js.map +1 -0
- package/dist/core/ui/plcCore.d.ts +1 -0
- package/dist/core/ui/plcCore.d.ts.map +1 -0
- package/dist/core/ui/plcCore.js +1 -0
- package/dist/core/ui/plcCore.js.map +1 -0
- package/dist/core/ui/plcErrorBoundary.d.ts +1 -0
- package/dist/core/ui/plcErrorBoundary.d.ts.map +1 -0
- package/dist/core/ui/plcErrorBoundary.js +1 -0
- package/dist/core/ui/plcErrorBoundary.js.map +1 -0
- package/dist/core/ui/plcInspector.d.ts +1 -0
- package/dist/core/ui/plcInspector.d.ts.map +1 -0
- package/dist/core/ui/plcInspector.js +1 -0
- package/dist/core/ui/plcInspector.js.map +1 -0
- package/dist/core/ui/plcLayout.d.ts +1 -0
- package/dist/core/ui/plcLayout.d.ts.map +1 -0
- package/dist/core/ui/plcLayout.js +3 -1
- package/dist/core/ui/plcLayout.js.map +1 -0
- package/dist/core/ui/plcSlotRenderer.d.ts +7 -0
- package/dist/core/ui/plcSlotRenderer.d.ts.map +1 -0
- package/dist/core/ui/plcSlotRenderer.js +11 -0
- package/dist/core/ui/plcSlotRenderer.js.map +1 -0
- package/dist/core.d.ts +21 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +32 -0
- package/dist/core.js.map +1 -0
- package/dist/index.d.ts +3 -8
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -8
- package/dist/index.js.map +1 -0
- package/dist/simple.d.ts +42 -0
- package/dist/simple.d.ts.map +1 -0
- package/dist/simple.js +88 -0
- package/dist/simple.js.map +1 -0
- package/dist/types/core/api.d.ts +1 -0
- package/dist/types/core/api.d.ts.map +1 -0
- package/dist/types/core/api.js +1 -0
- package/dist/types/core/api.js.map +1 -0
- package/dist/types/core/general.d.ts +2 -2
- package/dist/types/core/general.d.ts.map +1 -0
- package/dist/types/core/general.js +1 -0
- package/dist/types/core/general.js.map +1 -0
- package/dist/types/core/index.d.ts +2 -0
- package/dist/types/core/index.d.ts.map +1 -0
- package/dist/types/core/index.js +2 -0
- package/dist/types/core/index.js.map +1 -0
- package/dist/types/core/ui.d.ts +1 -0
- package/dist/types/core/ui.d.ts.map +1 -0
- package/dist/types/core/ui.js +1 -0
- package/dist/types/core/ui.js.map +1 -0
- package/dist/types/core.d.ts +45 -0
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/core.js +2 -0
- package/dist/types/core.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +4 -0
- package/dist/types/registry.d.ts +1 -0
- package/dist/types/registry.d.ts.map +1 -0
- package/dist/types/registry.js +1 -0
- package/dist/types/registry.js.map +1 -0
- 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
|
-
|
|
8
|
-
|
|
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
|
|
12
|
-
|
|
13
|
-
- Use this software as the basis for another framework,
|
|
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
|
-
|
|
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
|
-
|
|
5
|
-
[](LICENSE)
|
|
6
|
-
[](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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
31
|
+
```
|
|
37
32
|
|
|
38
33
|
---
|
|
39
34
|
|
|
40
|
-
##
|
|
35
|
+
## ⚡ Mode A: Simple Mode (Zero Config)
|
|
41
36
|
|
|
42
|
-
|
|
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
|
-
|
|
45
|
-
<summary>Example: types/registry.ts</summary>
|
|
39
|
+
### 1️⃣ Setup Store & Actions
|
|
46
40
|
|
|
47
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"app:loading": boolean;
|
|
54
|
-
}
|
|
43
|
+
```tsx
|
|
44
|
+
// store.ts
|
|
45
|
+
import { createSimplePlugC } from 'plug-code/simple';
|
|
55
46
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
148
|
+
// 3. UI Slots (Props)
|
|
149
|
+
slots: {
|
|
150
|
+
"main-layout": {};
|
|
151
|
+
"sidebar": { collapsed: boolean };
|
|
152
|
+
};
|
|
153
|
+
};
|
|
81
154
|
|
|
82
|
-
|
|
83
|
-
|
|
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 {
|
|
184
|
+
import { useStore, useCommand } from '../system'; // Import YOUR typed hooks
|
|
88
185
|
|
|
89
186
|
const UserList = () => {
|
|
90
|
-
|
|
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}
|
|
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: (
|
|
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
|
-
|
|
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
|
-
|
|
254
|
+
## 📚 API Reference
|
|
127
255
|
|
|
128
|
-
|
|
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
|
-
|
|
132
|
-
import { PlcStore, PlcAPI, PlcProvider } from 'plug-code';
|
|
133
|
-
import { UsersFeature } from './features/UsersFeature';
|
|
258
|
+
### 🧬 Root State Management
|
|
134
259
|
|
|
135
|
-
|
|
136
|
-
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
358
|
+
## 🛡️ Safety & Reliability
|
|
154
359
|
|
|
155
|
-
|
|
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
|
-
|
|
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
|
-
|
|
364
|
+
Every component injected into a Slot is automatically wrapped in a `SlotErrorBoundary`.
|
|
163
365
|
|
|
164
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
371
|
+
The framework manages updates using an internal **Priority Scheduler** fully compatible with **React 18**.
|
|
172
372
|
|
|
173
|
-
* `
|
|
174
|
-
* `
|
|
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
|
-
|
|
376
|
+
---
|
|
178
377
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
* `
|
|
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
|
|
188
|
-
* **Atomic
|
|
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`.
|
|
@@ -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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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,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,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EACH,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,OAAO,EACP,SAAS,EACT,eAAe,EACf,UAAU,EACb,MAAM,sBAAsB,CAAC;AAE9B,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,MAAM,eAAe,GACvD,CAAC,CAAC,SAAS,MAAM,eAAe,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAClE,GAAG,CAAC;AAIV,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAE5E,CAAC;AASF,wBAAgB,QAAQ,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAC1D,GAAG,EAAE,CAAC,EACN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GAAG,IAAI,CAAC,CAAC,CAAC;AAC5B,CAAC"}
|
package/dist/core/plcAPI.d.ts
CHANGED
|
@@ -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
|
|
27
|
-
constructor(
|
|
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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