@xenosystem/blocks 0.12.2 → 0.12.3
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/dist/edit/index.d.ts +8 -1
- package/dist/edit/index.js +12 -1
- package/package.json +1 -1
package/dist/edit/index.d.ts
CHANGED
|
@@ -1361,7 +1361,14 @@ declare class InspectorPanelController {
|
|
|
1361
1361
|
* components cannot cross a sandbox RPC boundary, so a sandboxed host simply cannot supply them and
|
|
1362
1362
|
* `type:'custom'` fields degrade to their JSON representation (union spec §1.1).
|
|
1363
1363
|
*/
|
|
1364
|
-
|
|
1364
|
+
interface CreateInspectorPanelOptions extends InspectorPanelControllerOptions {
|
|
1365
|
+
/**
|
|
1366
|
+
* Draw the panel yourself — a host that mounts the block AS ITS DECLARATION renders
|
|
1367
|
+
* `INSPECTOR_DECLARATION` from `inspectorViewState(controller)` with `inspectorRuntimeComponents(controller)`
|
|
1368
|
+
* in its registry and applies `ui` intents with `applyInspectorUi`. Default: the code view.
|
|
1369
|
+
*/
|
|
1370
|
+
render?: (root: HTMLElement, controller: InspectorPanelController) => () => void;
|
|
1371
|
+
}
|
|
1365
1372
|
/**
|
|
1366
1373
|
* Build the Inspector panel module.
|
|
1367
1374
|
*
|
package/dist/edit/index.js
CHANGED
|
@@ -3587,11 +3587,20 @@ function createInspectorPanel(options = {}) {
|
|
|
3587
3587
|
return {
|
|
3588
3588
|
manifest: inspectorManifest,
|
|
3589
3589
|
activate(host) {
|
|
3590
|
-
const
|
|
3590
|
+
const { render: customRender, ...controllerOptions } = options;
|
|
3591
|
+
const controller = new InspectorPanelController(host, controllerOptions);
|
|
3591
3592
|
void controller.load();
|
|
3592
3593
|
let root = null;
|
|
3594
|
+
let unrender = null;
|
|
3593
3595
|
return {
|
|
3594
3596
|
render(el) {
|
|
3597
|
+
if (customRender) {
|
|
3598
|
+
unrender = customRender(el, controller);
|
|
3599
|
+
return () => {
|
|
3600
|
+
unrender?.();
|
|
3601
|
+
unrender = null;
|
|
3602
|
+
};
|
|
3603
|
+
}
|
|
3595
3604
|
root = createRoot2(el);
|
|
3596
3605
|
root.render(createElement2(InspectorPanelView, { controller }));
|
|
3597
3606
|
return () => {
|
|
@@ -3614,6 +3623,8 @@ function createInspectorPanel(options = {}) {
|
|
|
3614
3623
|
dispose() {
|
|
3615
3624
|
root?.unmount();
|
|
3616
3625
|
root = null;
|
|
3626
|
+
unrender?.();
|
|
3627
|
+
unrender = null;
|
|
3617
3628
|
controller.dispose();
|
|
3618
3629
|
}
|
|
3619
3630
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenosystem/blocks",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "XENO Blocks — rung 3 of the front ladder: components composed into a contract-bearing unit (manifest: ports, intents, commands, agent surface), rendered by @xenosystem/workbench. ONE package, one subpath per family (/auth, /edit, /data, /time, /ops, /trust, /agent), one named export per block — XENO PACKAGE NAMING - STANDARD.md.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|