@xenosystem/blocks 0.13.6 → 0.13.8

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.
@@ -0,0 +1,330 @@
1
+ import {
2
+ EndIcon,
3
+ LoopIcon,
4
+ MetronomeIcon,
5
+ PauseIcon,
6
+ PlayIcon,
7
+ PlayPauseIcon,
8
+ RecordIcon,
9
+ ShuttleLeftIcon,
10
+ ShuttleRightIcon,
11
+ StartIcon,
12
+ StepBackIcon,
13
+ StepForwardIcon,
14
+ StopIcon
15
+ } from "./chunk-GTN5EDY3.js";
16
+ import {
17
+ CancelGlyph,
18
+ CaseGlyph,
19
+ ChevronGlyph,
20
+ ClearGlyph,
21
+ CollapseGlyph,
22
+ CopyGlyph,
23
+ DownloadGlyph,
24
+ ExpandGlyph,
25
+ PlugGlyph,
26
+ PlusGlyph,
27
+ RefreshGlyph,
28
+ RegexGlyph,
29
+ RetryGlyph,
30
+ SortAscGlyph,
31
+ SortDescGlyph,
32
+ Svg,
33
+ WholeWordGlyph,
34
+ XGlyph,
35
+ fromElement
36
+ } from "./chunk-K7YLLV2W.js";
37
+
38
+ // src/edit/tree/react/icons.tsx
39
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
40
+ var PATHS = {
41
+ folder: /* @__PURE__ */ jsx("path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }),
42
+ file: /* @__PURE__ */ jsxs(Fragment, { children: [
43
+ /* @__PURE__ */ jsx("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
44
+ /* @__PURE__ */ jsx("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
45
+ ] }),
46
+ "folder-tree": /* @__PURE__ */ jsxs(Fragment, { children: [
47
+ /* @__PURE__ */ jsx("path", { d: "M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z" }),
48
+ /* @__PURE__ */ jsx("path", { d: "M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2a1 1 0 0 0-.8-.4h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z" }),
49
+ /* @__PURE__ */ jsx("path", { d: "M3 5a2 2 0 0 0 2 2h3" }),
50
+ /* @__PURE__ */ jsx("path", { d: "M3 3v13a2 2 0 0 0 2 2h3" })
51
+ ] }),
52
+ box: /* @__PURE__ */ jsxs(Fragment, { children: [
53
+ /* @__PURE__ */ jsx("path", { d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" }),
54
+ /* @__PURE__ */ jsx("path", { d: "m3.3 7 8.7 5 8.7-5" }),
55
+ /* @__PURE__ */ jsx("path", { d: "M12 22V12" })
56
+ ] }),
57
+ component: /* @__PURE__ */ jsx("path", { d: "m12 2 4 4-4 4-4-4Zm0 12 4 4-4 4-4-4ZM2 12l4-4 4 4-4 4Zm12 0 4-4 4 4-4 4Z" }),
58
+ "file-text": /* @__PURE__ */ jsxs(Fragment, { children: [
59
+ /* @__PURE__ */ jsx("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
60
+ /* @__PURE__ */ jsx("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
61
+ /* @__PURE__ */ jsx("path", { d: "M8 13h8M8 17h5" })
62
+ ] }),
63
+ heading: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M6 4v16M18 4v16M6 12h12" }) }),
64
+ bot: /* @__PURE__ */ jsxs(Fragment, { children: [
65
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "8", width: "18", height: "12", rx: "2" }),
66
+ /* @__PURE__ */ jsx("path", { d: "M12 4v4M8 14h.01M16 14h.01" })
67
+ ] }),
68
+ link: /* @__PURE__ */ jsxs(Fragment, { children: [
69
+ /* @__PURE__ */ jsx("path", { d: "M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.8 1.7" }),
70
+ /* @__PURE__ */ jsx("path", { d: "M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.8-1.7" })
71
+ ] }),
72
+ "link-2-off": /* @__PURE__ */ jsxs(Fragment, { children: [
73
+ /* @__PURE__ */ jsx("path", { d: "M9 17H7A5 5 0 0 1 7 7" }),
74
+ /* @__PURE__ */ jsx("path", { d: "M15 7h2a5 5 0 0 1 4 8" }),
75
+ /* @__PURE__ */ jsx("path", { d: "M8 12h4" }),
76
+ /* @__PURE__ */ jsx("path", { d: "m2 2 20 20" })
77
+ ] }),
78
+ "circle-dot": /* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" })
79
+ };
80
+ function TreeIcon({ name, size = 11 }) {
81
+ return /* @__PURE__ */ jsx(Svg, { size, children: PATHS[name] ?? PATHS["circle-dot"] });
82
+ }
83
+
84
+ // src/edit/color/react/icons.tsx
85
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
86
+ var svg = (size) => ({ width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true });
87
+ function EyedropperIcon({ size = 11 } = {}) {
88
+ return /* @__PURE__ */ jsxs2("svg", { ...svg(size), children: [
89
+ /* @__PURE__ */ jsx2("path", { d: "m2 22 1-1h3l9-9" }),
90
+ /* @__PURE__ */ jsx2("path", { d: "M3 21v-3l9-9" }),
91
+ /* @__PURE__ */ jsx2("path", { d: "m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" })
92
+ ] });
93
+ }
94
+ function SwapIcon({ size = 11 } = {}) {
95
+ return /* @__PURE__ */ jsxs2("svg", { ...svg(size), children: [
96
+ /* @__PURE__ */ jsx2("path", { d: "m16 3 4 4-4 4" }),
97
+ /* @__PURE__ */ jsx2("path", { d: "M20 7H4" }),
98
+ /* @__PURE__ */ jsx2("path", { d: "m8 21-4-4 4-4" }),
99
+ /* @__PURE__ */ jsx2("path", { d: "M4 17h16" })
100
+ ] });
101
+ }
102
+
103
+ // src/edit/history/react/icons.tsx
104
+ import Trash from "@xenosystem/elements/elements/trash";
105
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
106
+ var svgBase = (size) => ({
107
+ width: size,
108
+ height: size,
109
+ viewBox: "0 0 24 24",
110
+ fill: "none",
111
+ stroke: "currentColor",
112
+ strokeWidth: 1.5,
113
+ strokeLinecap: "round",
114
+ strokeLinejoin: "round",
115
+ "aria-hidden": true
116
+ });
117
+ var ENTRY_PATHS = {
118
+ // painting
119
+ brush: ["M9.06 11.9l8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08", "M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02z"],
120
+ eraser: ["m7 21-4.3-4.3a1 1 0 0 1 0-1.4l10-10a1 1 0 0 1 1.4 0l5.6 5.6a1 1 0 0 1 0 1.4L13 21", "M22 21H7"],
121
+ fill: ["m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2a2 2 0 0 0 2.8 0L19 11Z", "m5 2 5 5", "M2 13h15"],
122
+ // adjustment / effects
123
+ filter: ["M4 6h16", "M7 12h10", "M10 18h4"],
124
+ // geometry
125
+ transform: ["M5 9 2 12l3 3", "M9 5l3-3 3 3", "M15 19l-3 3-3-3", "M19 9l3 3-3 3", "M2 12h20", "M12 2v20"],
126
+ crop: ["M6 2v14a2 2 0 0 0 2 2h14", "M18 22V8a2 2 0 0 0-2-2H2"],
127
+ // layers
128
+ addLayer: ["M3 3h18v18H3z", "M12 8v8", "M8 12h8"],
129
+ deleteLayer: ["M3 6h18", "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"],
130
+ merge: ["m12 2 4 4-4 4", "M4 6h12", "m12 14 4 4-4 4", "M4 18h12"],
131
+ // clipboard / text / selection
132
+ paste: ["M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2", "M9 2h6v4H9z"],
133
+ text: ["M4 7V4h16v3", "M9 20h6", "M12 4v16"],
134
+ selection: ["M4 8V6a2 2 0 0 1 2-2h2", "M16 4h2a2 2 0 0 1 2 2v2", "M20 16v2a2 2 0 0 1-2 2h-2", "M8 20H6a2 2 0 0 1-2-2v-2"],
135
+ // ai + snapshots
136
+ ai: ["m12 3 1.9 5.8L20 10l-5.2 2.9L13 19l-2.9-5.2L4 12l6.1-1.9z"],
137
+ snapshot: ["M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3Z", "M15 13a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"],
138
+ // timeline / audio
139
+ keyframe: ["m12 3 6 9-6 9-6-9z"],
140
+ clip: ["M3 5h18v14H3z", "M8 5v14", "M16 5v14"],
141
+ volume: ["M11 5 6 9H2v6h4l5 4V5Z", "M16 9a4 4 0 0 1 0 6"],
142
+ document: ["M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", "M14 2v5h6"],
143
+ // fallbacks / chrome
144
+ generic: ["M5 5h14v14H5z"],
145
+ original: ["M3 12a9 9 0 1 0 9-9", "M3 4v5h5"],
146
+ rotateCcw: ["M3 12a9 9 0 1 0 3-6.7L3 8", "M3 3v5h5"]
147
+ };
148
+ function EntryIcon({ name, size = 11 }) {
149
+ const paths = ENTRY_PATHS[name] ?? ENTRY_PATHS.generic;
150
+ return /* @__PURE__ */ jsx3("svg", { ...svgBase(size), children: paths.map((d, i) => /* @__PURE__ */ jsx3("path", { d }, i)) });
151
+ }
152
+ function XIcon({ size = 10 }) {
153
+ return /* @__PURE__ */ jsx3(XGlyph, { size });
154
+ }
155
+ var TrashIcon = fromElement(Trash);
156
+ function UndoIcon({ size = 11 }) {
157
+ return /* @__PURE__ */ jsxs3("svg", { ...svgBase(size), children: [
158
+ /* @__PURE__ */ jsx3("path", { d: "M9 14 4 9l5-5" }),
159
+ /* @__PURE__ */ jsx3("path", { d: "M4 9h10.5a5.5 5.5 0 0 1 0 11H11" })
160
+ ] });
161
+ }
162
+ function RedoIcon({ size = 11 }) {
163
+ return /* @__PURE__ */ jsxs3("svg", { ...svgBase(size), children: [
164
+ /* @__PURE__ */ jsx3("path", { d: "m15 14 5-5-5-5" }),
165
+ /* @__PURE__ */ jsx3("path", { d: "M20 9H9.5a5.5 5.5 0 0 0 0 11H13" })
166
+ ] });
167
+ }
168
+
169
+ // src/edit/inspector/react/icons.tsx
170
+ import Link from "@xenosystem/elements/elements/link";
171
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
172
+ var base = (size) => ({
173
+ width: size,
174
+ height: size,
175
+ viewBox: "0 0 24 24",
176
+ fill: "none",
177
+ stroke: "currentColor",
178
+ strokeWidth: 1.5,
179
+ strokeLinecap: "round",
180
+ strokeLinejoin: "round",
181
+ "aria-hidden": true
182
+ });
183
+ function StopwatchIcon({ size = 11 }) {
184
+ return /* @__PURE__ */ jsxs4("svg", { ...base(size), children: [
185
+ /* @__PURE__ */ jsx4("path", { d: "M10 2h4" }),
186
+ /* @__PURE__ */ jsx4("path", { d: "M12 14v-4" }),
187
+ /* @__PURE__ */ jsx4("path", { d: "M20 14a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z" })
188
+ ] });
189
+ }
190
+ function DiamondIcon({ size = 9, filled = false }) {
191
+ return /* @__PURE__ */ jsx4("svg", { ...base(size), fill: filled ? "currentColor" : "none", children: /* @__PURE__ */ jsx4("path", { d: "m12 3 7 9-7 9-7-9z" }) });
192
+ }
193
+ function PrevIcon({ size = 9 }) {
194
+ return /* @__PURE__ */ jsx4("svg", { ...base(size), children: /* @__PURE__ */ jsx4("path", { d: "m15 18-6-6 6-6" }) });
195
+ }
196
+ function NextIcon({ size = 9 }) {
197
+ return /* @__PURE__ */ jsx4("svg", { ...base(size), children: /* @__PURE__ */ jsx4("path", { d: "m9 18 6-6-6-6" }) });
198
+ }
199
+ var LinkIcon = fromElement(Link, 10);
200
+ function ResetIcon({ size = 10 }) {
201
+ return /* @__PURE__ */ jsxs4("svg", { ...base(size), children: [
202
+ /* @__PURE__ */ jsx4("path", { d: "M3 12a9 9 0 1 0 3-6.7L3 8" }),
203
+ /* @__PURE__ */ jsx4("path", { d: "M3 3v5h5" })
204
+ ] });
205
+ }
206
+ function XIcon2({ size = 10 }) {
207
+ return /* @__PURE__ */ jsxs4("svg", { ...base(size), children: [
208
+ /* @__PURE__ */ jsx4("path", { d: "M18 6 6 18" }),
209
+ /* @__PURE__ */ jsx4("path", { d: "m6 6 12 12" })
210
+ ] });
211
+ }
212
+
213
+ // src/edit/layers/react/icons.tsx
214
+ import Eye from "@xenosystem/elements/elements/eye";
215
+ import EyeOff from "@xenosystem/elements/elements/eye-off";
216
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
217
+ var base2 = (size) => ({
218
+ width: size,
219
+ height: size,
220
+ viewBox: "0 0 24 24",
221
+ fill: "none",
222
+ stroke: "currentColor",
223
+ strokeWidth: 1.5,
224
+ strokeLinecap: "round",
225
+ strokeLinejoin: "round",
226
+ "aria-hidden": true
227
+ });
228
+ var EyeIcon = fromElement(Eye, 12);
229
+ var EyeOffIcon = fromElement(EyeOff, 12);
230
+ function LockIcon({ size = 12, className }) {
231
+ return /* @__PURE__ */ jsxs5("svg", { ...base2(size), className, children: [
232
+ /* @__PURE__ */ jsx5("rect", { width: "14", height: "10", x: "5", y: "11", rx: "2" }),
233
+ /* @__PURE__ */ jsx5("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" })
234
+ ] });
235
+ }
236
+ function UnlockIcon({ size = 12, className }) {
237
+ return /* @__PURE__ */ jsxs5("svg", { ...base2(size), className, children: [
238
+ /* @__PURE__ */ jsx5("rect", { width: "14", height: "10", x: "5", y: "11", rx: "2" }),
239
+ /* @__PURE__ */ jsx5("path", { d: "M8 11V7a4 4 0 0 1 7.5-2" })
240
+ ] });
241
+ }
242
+ function KindGlyph({ size = 10 }) {
243
+ return /* @__PURE__ */ jsx5("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx5("rect", { x: "4", y: "4", width: "16", height: "16", rx: "2" }) });
244
+ }
245
+ function VisibilityIcon({ open, size }) {
246
+ return open ? /* @__PURE__ */ jsx5(EyeIcon, { size }) : /* @__PURE__ */ jsx5(EyeOffIcon, { size });
247
+ }
248
+ function LockStateIcon({ locked, size }) {
249
+ return locked ? /* @__PURE__ */ jsx5(LockIcon, { size }) : /* @__PURE__ */ jsx5(UnlockIcon, { size });
250
+ }
251
+
252
+ // src/icons/index.ts
253
+ var ICONS = Object.freeze({
254
+ // transport
255
+ "icons/Play": PlayIcon,
256
+ "icons/Pause": PauseIcon,
257
+ "icons/PlayPause": PlayPauseIcon,
258
+ "icons/Stop": StopIcon,
259
+ "icons/Record": RecordIcon,
260
+ "icons/Start": StartIcon,
261
+ "icons/End": EndIcon,
262
+ "icons/StepBack": StepBackIcon,
263
+ "icons/StepForward": StepForwardIcon,
264
+ "icons/ShuttleLeft": ShuttleLeftIcon,
265
+ "icons/ShuttleRight": ShuttleRightIcon,
266
+ "icons/Loop": LoopIcon,
267
+ "icons/Metronome": MetronomeIcon,
268
+ // history
269
+ "icons/Undo": UndoIcon,
270
+ "icons/Redo": RedoIcon,
271
+ "icons/Trash": TrashIcon,
272
+ "icons/HistoryEntry": EntryIcon,
273
+ // inspector
274
+ "icons/Stopwatch": StopwatchIcon,
275
+ "icons/Diamond": DiamondIcon,
276
+ "icons/Prev": PrevIcon,
277
+ "icons/Next": NextIcon,
278
+ "icons/Link": LinkIcon,
279
+ "icons/Reset": ResetIcon,
280
+ // layers
281
+ "icons/Kind": KindGlyph,
282
+ "icons/Visibility": VisibilityIcon,
283
+ "icons/LockState": LockStateIcon,
284
+ // color
285
+ "icons/Swap": SwapIcon,
286
+ "icons/Eyedropper": EyedropperIcon,
287
+ // shared (src/icons/glyphs.tsx — the one source; the data/ops/time blocks re-export these)
288
+ "icons/Refresh": RefreshGlyph,
289
+ "icons/Close": XGlyph,
290
+ "icons/Plus": PlusGlyph,
291
+ "icons/Chevron": ChevronGlyph,
292
+ "icons/Download": DownloadGlyph,
293
+ "icons/Plug": PlugGlyph,
294
+ "icons/SortAsc": SortAscGlyph,
295
+ "icons/SortDesc": SortDescGlyph,
296
+ "icons/Expand": ExpandGlyph,
297
+ "icons/Collapse": CollapseGlyph,
298
+ "icons/Copy": CopyGlyph,
299
+ "icons/Clear": ClearGlyph,
300
+ "icons/Cancel": CancelGlyph,
301
+ "icons/Retry": RetryGlyph,
302
+ "icons/Case": CaseGlyph,
303
+ "icons/WholeWord": WholeWordGlyph,
304
+ "icons/Regex": RegexGlyph,
305
+ "icons/TreeKind": TreeIcon
306
+ });
307
+ var ICON_UNITS = Object.keys(ICONS);
308
+
309
+ export {
310
+ TreeIcon,
311
+ EyedropperIcon,
312
+ SwapIcon,
313
+ EntryIcon,
314
+ XIcon,
315
+ TrashIcon,
316
+ UndoIcon,
317
+ RedoIcon,
318
+ StopwatchIcon,
319
+ DiamondIcon,
320
+ PrevIcon,
321
+ NextIcon,
322
+ LinkIcon,
323
+ ResetIcon,
324
+ XIcon2,
325
+ KindGlyph,
326
+ VisibilityIcon,
327
+ LockStateIcon,
328
+ ICONS,
329
+ ICON_UNITS
330
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  fromElement
3
- } from "./chunk-YTSBYJVH.js";
3
+ } from "./chunk-K7YLLV2W.js";
4
4
 
5
5
  // src/time/transport/react/icons.tsx
6
6
  import Pause from "@xenosystem/elements/elements/pause";
@@ -93,6 +93,21 @@ function CaseGlyph({ size = 12 } = {}) {
93
93
  /* @__PURE__ */ jsx2("path", { d: "M21 9v6" })
94
94
  ] });
95
95
  }
96
+ function WholeWordGlyph({ size = 12 } = {}) {
97
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
98
+ /* @__PURE__ */ jsx2("path", { d: "M7 12h10" }),
99
+ /* @__PURE__ */ jsx2("path", { d: "M3 7v10" }),
100
+ /* @__PURE__ */ jsx2("path", { d: "M21 7v10" })
101
+ ] });
102
+ }
103
+ function RegexGlyph({ size = 12 } = {}) {
104
+ return /* @__PURE__ */ jsxs(Svg, { size, children: [
105
+ /* @__PURE__ */ jsx2("path", { d: "M12 4v8" }),
106
+ /* @__PURE__ */ jsx2("path", { d: "m8.5 6 7 4" }),
107
+ /* @__PURE__ */ jsx2("path", { d: "m8.5 10 7-4" }),
108
+ /* @__PURE__ */ jsx2("path", { d: "M5 18h2" })
109
+ ] });
110
+ }
96
111
 
97
112
  export {
98
113
  fromElement,
@@ -111,5 +126,7 @@ export {
111
126
  ClearGlyph,
112
127
  CancelGlyph,
113
128
  RetryGlyph,
114
- CaseGlyph
129
+ CaseGlyph,
130
+ WholeWordGlyph,
131
+ RegexGlyph
115
132
  };
@@ -1,4 +1,4 @@
1
- import { PanelModule, PanelManifest, LogSink } from '@xenosystem/block-sdk';
1
+ import { PanelModule, PanelManifest, BlockDeclaration, LogSink } from '@xenosystem/block-sdk';
2
2
  import * as _xenosystem_data_core from '@xenosystem/data-core';
3
3
  import { XenoColumn, XenoQuery, XenoResultSet, XenoValue, XenoRow, XenoAggFn, XenoValueFormat, XenoFilterGroup, XenoColumnRole, XenoSchemaCatalog, XenoFilter, XenoSourceSchema } from '@xenosystem/data-core';
4
4
  import { ReactNode } from 'react';
@@ -1762,24 +1762,153 @@ declare const FIELDS_PANEL_ID = "xeno.core.fields";
1762
1762
  declare const fieldsManifest: PanelManifest;
1763
1763
 
1764
1764
  /**
1765
- * The Fields panel view — column list, shelves, filter builder.
1765
+ * The Fields panel AS A DECLARATION — the tenth declared block, and the first DATA block: a schema's
1766
+ * columns, the shelves they are dropped on (rows / columns / values / sorts…), and the filter group,
1767
+ * over the host's data-core query model.
1766
1768
  *
1767
- * Composes `@xenosystem/components/chrome`; the host must ensure
1768
- * `@xenosystem/workbench/primitives.css` is present.
1769
+ * Everything drawn is data: the toolbar (a "sampled schema" badge, Auto-assign, the optional Apply),
1770
+ * the Fields section (a listbox of columns, focus-selectable, with a distinct-count badge), one
1771
+ * Section per shelf (entries as a plain list — each carries an aggregate `Select`, a direction
1772
+ * button or a granularity badge, and a remove button, so it is a `list`, never a `listbox`), the
1773
+ * Filters section (leaf rows with an operator `Select`, group rows, the combinator strip), the
1774
+ * status bar. Shelf hints and the empty-filters note are `chrome/Note`.
1775
+ *
1776
+ * Nothing is bound at runtime: every intent — focus, remove, aggregate, direction, add/remove/update
1777
+ * filter, combinator, auto-assign, apply — is a `ui` emit the runtime applies. A `Select` inside a
1778
+ * row emits its own change; the row is not selectable, so nothing competes.
1779
+ */
1780
+
1781
+ interface FieldsViewColumn {
1782
+ id: string;
1783
+ name: string;
1784
+ role: string;
1785
+ focused: boolean;
1786
+ stat?: string;
1787
+ statTitle?: string;
1788
+ }
1789
+ interface FieldsViewEntry {
1790
+ /** Flattened: a nested `each` cannot reach the outer item, so the entry carries its shelf. */
1791
+ shelfId: string;
1792
+ columnId: string;
1793
+ label: string;
1794
+ suggested: boolean;
1795
+ aggregated: boolean;
1796
+ fn: string;
1797
+ aggregates: {
1798
+ value: string;
1799
+ label: string;
1800
+ }[];
1801
+ sortable: boolean;
1802
+ direction: string;
1803
+ granularity?: string;
1804
+ removeLabel: string;
1805
+ }
1806
+ interface FieldsViewShelf {
1807
+ id: string;
1808
+ label: string;
1809
+ count: number;
1810
+ hasEntries: boolean;
1811
+ empty: boolean;
1812
+ hint: string;
1813
+ entries: FieldsViewEntry[];
1814
+ }
1815
+ interface FieldsViewFilter {
1816
+ key: string;
1817
+ index: number;
1818
+ leaf: boolean;
1819
+ label: string;
1820
+ op: string;
1821
+ ops: {
1822
+ value: string;
1823
+ label: string;
1824
+ }[];
1825
+ removeLabel: string;
1826
+ }
1827
+ interface FieldsViewModel {
1828
+ hasColumns: boolean;
1829
+ noColumns: boolean;
1830
+ sampleWarning?: string;
1831
+ sampled: boolean;
1832
+ manualApply: boolean;
1833
+ applyDisabled: boolean;
1834
+ columns: FieldsViewColumn[];
1835
+ shelves: FieldsViewShelf[];
1836
+ filters: FieldsViewFilter[];
1837
+ filterCount: number;
1838
+ hasFilters: boolean;
1839
+ noFilters: boolean;
1840
+ combinator: 'and' | 'or';
1841
+ countLabel: string;
1842
+ dirtyLabel?: string;
1843
+ }
1844
+ type FieldsUiIntent = {
1845
+ kind: 'autoAssign';
1846
+ } | {
1847
+ kind: 'apply';
1848
+ } | {
1849
+ kind: 'focus';
1850
+ columnId: string;
1851
+ } | {
1852
+ kind: 'remove';
1853
+ shelfId: string;
1854
+ columnId: string;
1855
+ } | {
1856
+ kind: 'aggregate';
1857
+ shelfId: string;
1858
+ columnId: string;
1859
+ fn: string;
1860
+ } | {
1861
+ kind: 'direction';
1862
+ shelfId: string;
1863
+ columnId: string;
1864
+ } | {
1865
+ kind: 'addFilter';
1866
+ } | {
1867
+ kind: 'addGroup';
1868
+ } | {
1869
+ kind: 'filterOp';
1870
+ index: number;
1871
+ op: string;
1872
+ } | {
1873
+ kind: 'removeFilter';
1874
+ index: number;
1875
+ } | {
1876
+ kind: 'combinator';
1877
+ combinator: 'and' | 'or';
1878
+ };
1879
+ interface FieldsViewOptions {
1880
+ showStats?: boolean;
1881
+ manualApply?: boolean;
1882
+ }
1883
+ /** Derive the view from the live controller — the runtime calls this on every draw. */
1884
+ declare function fieldsViewState(c: FieldsController, options?: FieldsViewOptions): FieldsViewModel;
1885
+ /** Apply a `ui` intent to the controller. */
1886
+ declare function applyFieldsUi(c: FieldsController, intent: FieldsUiIntent): void;
1887
+ declare const fieldsViewManifest: PanelManifest;
1888
+ declare const BEHAVIOURS: {
1889
+ 'data/fieldsPanelView': (inputs: Record<string, unknown>) => FieldsViewModel;
1890
+ };
1891
+ /** No runtime-bound units: every intent is a `ui` emit. */
1892
+ declare const FIELDS_RUNTIME_UNITS: readonly [];
1893
+ declare const FIELDS_DECLARATION: BlockDeclaration;
1894
+
1895
+ /**
1896
+ * The Fields panel view — the CODE VIEW of `FIELDS_DECLARATION`, drawing the same `FieldsViewModel`
1897
+ * byte-identical (the equivalence suite holds the two together). Nothing here reaches the controller
1898
+ * except through `applyFieldsUi`; there is no runtime-bound unit.
1899
+ *
1900
+ * Composes `@xenosystem/components/chrome`; the host must ensure `@xenosystem/workbench/primitives.css` is
1901
+ * present.
1769
1902
  *
1770
1903
  * @module
1771
1904
  */
1772
1905
 
1773
1906
  /** Props for {@link FieldsPanelView}. */
1774
- interface FieldsPanelViewProps {
1907
+ interface FieldsPanelViewProps extends FieldsViewOptions {
1775
1908
  controller: FieldsController;
1776
- /** Render live cardinality/null counts. */
1777
- showStats?: boolean;
1778
- /** Show an explicit Apply (config `autoApply: false`). */
1779
- manualApply?: boolean;
1780
1909
  }
1781
1910
  /** The Fields panel view. */
1782
- declare function FieldsPanelView({ controller, showStats, manualApply, }: FieldsPanelViewProps): ReactNode;
1911
+ declare function FieldsPanelView({ controller, showStats, manualApply }: FieldsPanelViewProps): ReactNode;
1783
1912
 
1784
1913
  /**
1785
1914
  * The Connectors controller — the data family's **resolver**.
@@ -3252,4 +3381,4 @@ interface ConnectorsPanelViewProps {
3252
3381
  /** The Connectors panel view. */
3253
3382
  declare function ConnectorsPanelView({ controller, emptyHint, }: ConnectorsPanelViewProps): ReactNode;
3254
3383
 
3255
- export { AGENT_HIDDEN_COMMANDS, ALL_AGGREGATES, ALL_CHART_TYPES, type BuildChartOptions, type BuildSelectOptions, type BuildSelectResult, CHART_EMPTY_FILL, CHART_PALETTE_STEPS, CHART_PANEL_ID, CONNECTORS_PANEL_ID, type CellAddress, ChartController, type ChartControllerOptions, type ChartHostBridge, type ChartPanelState, ChartPanelView, type ChartPanelViewProps, type ChartRenderContext, type ChartRenderInput, type ChartRenderOptions, type ChartRenderer, type ChartViewState, type ColumnLayout, type ColumnWindow, ConnectorExecuteInput, ConnectorExecuteOutput, ConnectorTransport, ConnectorsController, type ConnectorsControllerOptions, type ConnectorsHostBridge, ConnectorsPanelState, ConnectorsPanelView, type ConnectorsPanelViewProps, type ConnectorsRenderContext, ConnectorsViewState, type CreateChartPanelOptions, type CreateConnectorExecutorOptions, type CreateConnectorsPanelOptions, type CreateFieldsPanelOptions, type CreateMetricsPanelOptions, type CreateTablePanelOptions, type CredentialDraft, type CredentialErrors, DEFAULT_COLUMN_WIDTH, DEFAULT_PAGE_SIZE, DEFAULT_RANGES, type DeltaDirection, EMPTY_LAYOUT, EXPIRY_SKEW_MS, type ExecuteError, FIELDS_PANEL_ID, FieldsController, type FieldsControllerOptions, type FieldsHostBridge, type FieldsPanelState, FieldsPanelView, type FieldsPanelViewProps, type FieldsRenderContext, type FieldsViewState, type HostSqlResolver, IMPLEMENTED_VIEW_MODES, type LoopbackRequest, type LoopbackVerdict, METRICS_PANEL_ID, MIN_COLUMN_WIDTH, MONO_FILL_PALETTE, MONO_PALETTE, MetricsController, type MetricsControllerOptions, type MetricsHostBridge, type MetricsPanelState, MetricsPanelView, type MetricsPanelViewProps, type MetricsRenderContext, type MetricsViewState, type NumericConstraints, type OAuthStateRecord, type OAuthStateStore, type OAuthStateStoreOptions, type ParseCsvOptions, type ParseResult, type ParsedCsv, type PkcePair, PushdownSplit, type RefreshCoordinator, type ResolvedColumn, SHELF_PRESETS, type StoredOAuthToken, SubstrateFacilities, TABLE_PANEL_ID, TableController, type TableControllerOptions, type TableHostBridge, type TablePanelState, TablePanelView, type TablePanelViewProps, type TableRenderContext, type TableViewMode, type TableViewState, type TokenEndpointResponse, type VirtualWindow, type XenoAlertLevel, type XenoCalculatedFieldRequest, type XenoCellEdit, type XenoChartData, type XenoChartDrillDown, type XenoChartEncoding, type XenoChartExportRequest, type XenoChartHighlight, type XenoChartSeries, type XenoChartType, XenoConnection, XenoConnectionStatus, XenoConnectorFetch, XenoConnectorFileReader, XenoConnectorQueryRequest, XenoCredentialField, XenoCredentialFormSpec, XenoCredentialResult, type XenoFieldStat, type XenoMetricAlert, type XenoMetricRange, type XenoMetricSpec, type XenoMetricThreshold, type XenoMetricValue, XenoResolverErrorCode, XenoRestPaging, type XenoRowActivate, type XenoShelfEntry, type XenoShelfSpec, XenoSqlEngine, applyPrecision, base64Url, breachSideOf, buildChartData, buildRestUrl, buildSelect, chartManifest, chartPanel, clamp, classifyHttpStatus, coerceCsvValues, columnIndexAt, columnsOf, compileForHost, computeColumnWindow, computeWindow, connectorsManifest, connectorsPanel, constraintsOfColumn, createChartPanel, createConnectorExecutor, createConnectorsPanel, createFieldsPanel, createMetricsPanel, createOAuthStateStore, createPkcePair, createRefreshCoordinator, createTablePanel, credentialSpecProblem, defaultAggregateFor, defaultEncoding, deltaToneOf, emptyFilterGroup, entityOf, escapeLikePattern, executeCsvFile, executeDuckDb, executeGraphql, executeJsonFile, executeRest, executeSql, extractJsonPath, extractRows, fieldsManifest, fieldsPanel, firstGraphqlError, frozenWidth, getChartRenderer, isCategorical, isFieldVisible, isFilled, isLeafFilter, isLoopbackHost, isSafeTableName, mergeRefreshResponse, metricsManifest, metricsPanel, moveCell, moveColumn, needsRefresh, nextPageToken, normalizeLayout, normalizeNumeric, offerableAggregates, offerableFilterOps, parseCsv, parseJsonBody, parseJsonPath, parseLinkHeader, parseNumeric, pruneHiddenValues, queriesEqual, quoteIdent, quoteLiteral, redirectUriFor, renderFilterGroup, resolveChartColors, resolveColumns, rowsForMark, scrollLeftToReveal, scrollTopToReveal, setChartRenderer, setColumnVisible, setColumnWidth, setFrozenCount, sniffDelimiter, suggestedShelfFor, tableManifest, tablePanel, toChartJsConfig, toExecuteError, totalWidth, uniqueTableName, unsupportedMessage, validateCredentialDraft, validateEncoding, validateLoopbackRequest, visibleFields };
3384
+ export { AGENT_HIDDEN_COMMANDS, ALL_AGGREGATES, ALL_CHART_TYPES, type BuildChartOptions, type BuildSelectOptions, type BuildSelectResult, CHART_EMPTY_FILL, CHART_PALETTE_STEPS, CHART_PANEL_ID, CONNECTORS_PANEL_ID, type CellAddress, ChartController, type ChartControllerOptions, type ChartHostBridge, type ChartPanelState, ChartPanelView, type ChartPanelViewProps, type ChartRenderContext, type ChartRenderInput, type ChartRenderOptions, type ChartRenderer, type ChartViewState, type ColumnLayout, type ColumnWindow, ConnectorExecuteInput, ConnectorExecuteOutput, ConnectorTransport, ConnectorsController, type ConnectorsControllerOptions, type ConnectorsHostBridge, ConnectorsPanelState, ConnectorsPanelView, type ConnectorsPanelViewProps, type ConnectorsRenderContext, ConnectorsViewState, type CreateChartPanelOptions, type CreateConnectorExecutorOptions, type CreateConnectorsPanelOptions, type CreateFieldsPanelOptions, type CreateMetricsPanelOptions, type CreateTablePanelOptions, type CredentialDraft, type CredentialErrors, DEFAULT_COLUMN_WIDTH, DEFAULT_PAGE_SIZE, DEFAULT_RANGES, type DeltaDirection, EMPTY_LAYOUT, EXPIRY_SKEW_MS, type ExecuteError, BEHAVIOURS as FIELDS_BEHAVIOURS, FIELDS_DECLARATION, FIELDS_PANEL_ID, FIELDS_RUNTIME_UNITS, FieldsController, type FieldsControllerOptions, type FieldsHostBridge, type FieldsPanelState, FieldsPanelView, type FieldsPanelViewProps, type FieldsRenderContext, type FieldsUiIntent, type FieldsViewColumn, type FieldsViewEntry, type FieldsViewFilter, type FieldsViewModel, type FieldsViewOptions, type FieldsViewShelf, type FieldsViewState, type HostSqlResolver, IMPLEMENTED_VIEW_MODES, type LoopbackRequest, type LoopbackVerdict, METRICS_PANEL_ID, MIN_COLUMN_WIDTH, MONO_FILL_PALETTE, MONO_PALETTE, MetricsController, type MetricsControllerOptions, type MetricsHostBridge, type MetricsPanelState, MetricsPanelView, type MetricsPanelViewProps, type MetricsRenderContext, type MetricsViewState, type NumericConstraints, type OAuthStateRecord, type OAuthStateStore, type OAuthStateStoreOptions, type ParseCsvOptions, type ParseResult, type ParsedCsv, type PkcePair, PushdownSplit, type RefreshCoordinator, type ResolvedColumn, SHELF_PRESETS, type StoredOAuthToken, SubstrateFacilities, TABLE_PANEL_ID, TableController, type TableControllerOptions, type TableHostBridge, type TablePanelState, TablePanelView, type TablePanelViewProps, type TableRenderContext, type TableViewMode, type TableViewState, type TokenEndpointResponse, type VirtualWindow, type XenoAlertLevel, type XenoCalculatedFieldRequest, type XenoCellEdit, type XenoChartData, type XenoChartDrillDown, type XenoChartEncoding, type XenoChartExportRequest, type XenoChartHighlight, type XenoChartSeries, type XenoChartType, XenoConnection, XenoConnectionStatus, XenoConnectorFetch, XenoConnectorFileReader, XenoConnectorQueryRequest, XenoCredentialField, XenoCredentialFormSpec, XenoCredentialResult, type XenoFieldStat, type XenoMetricAlert, type XenoMetricRange, type XenoMetricSpec, type XenoMetricThreshold, type XenoMetricValue, XenoResolverErrorCode, XenoRestPaging, type XenoRowActivate, type XenoShelfEntry, type XenoShelfSpec, XenoSqlEngine, applyFieldsUi, applyPrecision, base64Url, breachSideOf, buildChartData, buildRestUrl, buildSelect, chartManifest, chartPanel, clamp, classifyHttpStatus, coerceCsvValues, columnIndexAt, columnsOf, compileForHost, computeColumnWindow, computeWindow, connectorsManifest, connectorsPanel, constraintsOfColumn, createChartPanel, createConnectorExecutor, createConnectorsPanel, createFieldsPanel, createMetricsPanel, createOAuthStateStore, createPkcePair, createRefreshCoordinator, createTablePanel, credentialSpecProblem, defaultAggregateFor, defaultEncoding, deltaToneOf, emptyFilterGroup, entityOf, escapeLikePattern, executeCsvFile, executeDuckDb, executeGraphql, executeJsonFile, executeRest, executeSql, extractJsonPath, extractRows, fieldsManifest, fieldsPanel, fieldsViewManifest, fieldsViewState, firstGraphqlError, frozenWidth, getChartRenderer, isCategorical, isFieldVisible, isFilled, isLeafFilter, isLoopbackHost, isSafeTableName, mergeRefreshResponse, metricsManifest, metricsPanel, moveCell, moveColumn, needsRefresh, nextPageToken, normalizeLayout, normalizeNumeric, offerableAggregates, offerableFilterOps, parseCsv, parseJsonBody, parseJsonPath, parseLinkHeader, parseNumeric, pruneHiddenValues, queriesEqual, quoteIdent, quoteLiteral, redirectUriFor, renderFilterGroup, resolveChartColors, resolveColumns, rowsForMark, scrollLeftToReveal, scrollTopToReveal, setChartRenderer, setColumnVisible, setColumnWidth, setFrozenCount, sniffDelimiter, suggestedShelfFor, tableManifest, tablePanel, toChartJsConfig, toExecuteError, totalWidth, uniqueTableName, unsupportedMessage, validateCredentialDraft, validateEncoding, validateLoopbackRequest, visibleFields };