@xenosystem/blocks 0.17.0 → 0.18.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/dist/edit/index.d.ts +18 -1
- package/dist/edit/index.js +7 -4
- package/package.json +3 -3
package/dist/edit/index.d.ts
CHANGED
|
@@ -6767,6 +6767,17 @@ type XenoTreeIcon = {
|
|
|
6767
6767
|
} | {
|
|
6768
6768
|
kind: 'text';
|
|
6769
6769
|
value: string;
|
|
6770
|
+
}
|
|
6771
|
+
/**
|
|
6772
|
+
* A thumbnail the HOST rendered — a data or blob URL — drawn in the row's icon slot by
|
|
6773
|
+
* `chrome/Thumb`. The panel decodes and fetches nothing (the no-pixel-capability rule stands; the
|
|
6774
|
+
* pixels are the host's). Default frame 44×32.
|
|
6775
|
+
*/
|
|
6776
|
+
| {
|
|
6777
|
+
kind: 'image';
|
|
6778
|
+
src: string;
|
|
6779
|
+
width?: number;
|
|
6780
|
+
height?: number;
|
|
6770
6781
|
};
|
|
6771
6782
|
/** What a node permits. Absent ⇒ permitted. */
|
|
6772
6783
|
interface XenoTreeCaps {
|
|
@@ -6879,7 +6890,9 @@ interface XenoTreeNode {
|
|
|
6879
6890
|
title?: string;
|
|
6880
6891
|
}
|
|
6881
6892
|
/** Which adapter produced this source. Presentation hint + telemetry; never behaviour. */
|
|
6882
|
-
type XenoTreeSourceKind = 'scene-graph' | 'entity' | 'project-entities' | 'document-pages'
|
|
6893
|
+
type XenoTreeSourceKind = 'scene-graph' | 'entity' | 'project-entities' | 'document-pages'
|
|
6894
|
+
/** A library of reusable things — components, assets, presets — usually with `image` icons and `dragOut`. */
|
|
6895
|
+
| 'library' | 'filesystem' | 'derived-outline' | 'org' | 'custom';
|
|
6883
6896
|
/**
|
|
6884
6897
|
* The source-level lifecycle — one incumbent's six-state machine, hoisted.
|
|
6885
6898
|
*
|
|
@@ -7515,6 +7528,10 @@ interface IconHalf {
|
|
|
7515
7528
|
iconName: string | null;
|
|
7516
7529
|
/** Literal text (emoji) instead of a glyph. */
|
|
7517
7530
|
iconText: string | null;
|
|
7531
|
+
/** A host-rendered thumbnail (`chrome/Thumb`). */
|
|
7532
|
+
iconSrc: string | null;
|
|
7533
|
+
iconWidth: number;
|
|
7534
|
+
iconHeight: number;
|
|
7518
7535
|
}
|
|
7519
7536
|
interface TreeViewAction extends IconHalf {
|
|
7520
7537
|
key: string;
|
package/dist/edit/index.js
CHANGED
|
@@ -13582,12 +13582,13 @@ import {
|
|
|
13582
13582
|
TextButton as TextButton7,
|
|
13583
13583
|
Toolbar as Toolbar7,
|
|
13584
13584
|
ToolbarGroup as ToolbarGroup5,
|
|
13585
|
-
VirtualWindow as VirtualWindow3
|
|
13585
|
+
VirtualWindow as VirtualWindow3,
|
|
13586
|
+
Thumb
|
|
13586
13587
|
} from "@xenosystem/components/chrome";
|
|
13587
13588
|
|
|
13588
13589
|
// src/edit/tree/declaration.ts
|
|
13589
13590
|
import { computeWindow as computeWindow3 } from "@xenosystem/tree-core";
|
|
13590
|
-
var iconHalf = (icon) => icon.kind === "text" ? { iconName: null, iconText: icon.value } : { iconName: icon.name, iconText: null };
|
|
13591
|
+
var iconHalf = (icon) => icon.kind === "text" ? { iconName: null, iconText: icon.value, iconSrc: null, iconWidth: 0, iconHeight: 0 } : icon.kind === "image" ? { iconName: null, iconText: null, iconSrc: icon.src, iconWidth: icon.width ?? 44, iconHeight: icon.height ?? 32 } : { iconName: icon.name, iconText: null, iconSrc: null, iconWidth: 0, iconHeight: 0 };
|
|
13591
13592
|
function treeViewState(c, options = {}) {
|
|
13592
13593
|
const { overscan = 6, showSearch = true, columns, emptyHint } = options;
|
|
13593
13594
|
const state = c.getState();
|
|
@@ -13769,6 +13770,7 @@ var nodeIcon = () => ({
|
|
|
13769
13770
|
component: "fragment",
|
|
13770
13771
|
children: [
|
|
13771
13772
|
{ component: "icons/TreeKind", when: { item: "iconName" }, props: { name: { item: "iconName" } } },
|
|
13773
|
+
{ component: "chrome/Thumb", when: { item: "iconSrc" }, props: { src: { item: "iconSrc" }, width: { item: "iconWidth" }, height: { item: "iconHeight" } } },
|
|
13772
13774
|
{ component: "chrome/Text", when: { item: "iconText" }, props: { role: { value: "caption" } }, children: [text10({ item: "iconText" })] }
|
|
13773
13775
|
]
|
|
13774
13776
|
});
|
|
@@ -13891,8 +13893,9 @@ function TreePanelView({ controller, ...options }) {
|
|
|
13891
13893
|
useSyncExternalStore10(controller.subscribe, controller.getState, controller.getState);
|
|
13892
13894
|
const view = treeViewState(controller, options);
|
|
13893
13895
|
const ui10 = (intent) => applyTreeUi(controller, intent, options);
|
|
13894
|
-
const icon = (name, textValue) => /* @__PURE__ */ jsxs11(Fragment9, { children: [
|
|
13896
|
+
const icon = (name, textValue, src = null, w = 0, h = 0) => /* @__PURE__ */ jsxs11(Fragment9, { children: [
|
|
13895
13897
|
name ? /* @__PURE__ */ jsx12(TreeIcon, { name }) : null,
|
|
13898
|
+
src ? /* @__PURE__ */ jsx12(Thumb, { src, width: w, height: h }) : null,
|
|
13896
13899
|
textValue ? /* @__PURE__ */ jsx12(Text9, { role: "caption", children: textValue }) : null
|
|
13897
13900
|
] });
|
|
13898
13901
|
const row2 = (r) => /* @__PURE__ */ jsx12(
|
|
@@ -13907,7 +13910,7 @@ function TreePanelView({ controller, ...options }) {
|
|
|
13907
13910
|
expanded: r.expanded,
|
|
13908
13911
|
dropHint: r.dropHint,
|
|
13909
13912
|
title: r.dropTitle,
|
|
13910
|
-
icon: icon(r.iconName, r.iconText),
|
|
13913
|
+
icon: icon(r.iconName, r.iconText, r.iconSrc, r.iconWidth, r.iconHeight),
|
|
13911
13914
|
label: /* @__PURE__ */ jsxs11(Fragment9, { children: [
|
|
13912
13915
|
r.renaming ? /* @__PURE__ */ jsx12(Input5, { autoFocus: true, value: r.draft, label: "Name", onChange: (value) => ui10({ kind: "renameDraft", value }), onBlur: () => ui10({ kind: "commitRename" }), onKeyDown: (e) => ui10({ kind: "renameKey", key: e.key }) }) : null,
|
|
13913
13916
|
!r.renaming ? r.label : null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenosystem/blocks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
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",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@duckdb/duckdb-wasm": ">=1.28.0",
|
|
66
66
|
"@xenosystem/block-sdk": ">=0.3.4 <1",
|
|
67
|
-
"@xenosystem/components": ">=0.
|
|
67
|
+
"@xenosystem/components": ">=0.34.0 <1",
|
|
68
68
|
"@xenosystem/data-core": "^0.1.0",
|
|
69
69
|
"@xenosystem/elements": ">=0.0.1",
|
|
70
70
|
"@xenosystem/elements-react": ">=0.0.1",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@types/react": "^19.0.0",
|
|
82
82
|
"@types/react-dom": "^19.0.0",
|
|
83
83
|
"@xenosystem/block-sdk": "^0.3.4",
|
|
84
|
-
"@xenosystem/components": "^0.
|
|
84
|
+
"@xenosystem/components": "^0.34.0",
|
|
85
85
|
"@xenosystem/data-core": "^0.1.0",
|
|
86
86
|
"@xenosystem/elements": "0.0.1",
|
|
87
87
|
"@xenosystem/elements-react": "0.0.1",
|