@xenosystem/blocks 0.15.2 → 0.16.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/{chunk-LKYPCOTE.js → chunk-6STT7CAM.js} +194 -80
- package/dist/data/index.js +1 -1
- package/dist/edit/index.d.ts +2 -0
- package/dist/edit/index.js +5 -4
- package/dist/icons/index.js +1 -1
- package/dist/ops/index.d.ts +7 -0
- package/dist/ops/index.js +28 -3
- package/dist/time/index.js +1 -1
- package/package.json +1 -1
|
@@ -108,75 +108,173 @@ function RegexGlyph({ size = 12 } = {}) {
|
|
|
108
108
|
/* @__PURE__ */ jsx2("path", { d: "M5 18h2" })
|
|
109
109
|
] });
|
|
110
110
|
}
|
|
111
|
+
function AlignLeftGlyph({ size } = {}) {
|
|
112
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
113
|
+
/* @__PURE__ */ jsx2("rect", { x: "6", y: "14", width: "9", height: "6", rx: "2" }),
|
|
114
|
+
/* @__PURE__ */ jsx2("rect", { x: "6", y: "4", width: "16", height: "6", rx: "2" }),
|
|
115
|
+
/* @__PURE__ */ jsx2("path", { d: "M2 2v20" })
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
function AlignHCenterGlyph({ size } = {}) {
|
|
119
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
120
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 2v20" }),
|
|
121
|
+
/* @__PURE__ */ jsx2("path", { d: "M8 10H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4" }),
|
|
122
|
+
/* @__PURE__ */ jsx2("path", { d: "M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4" }),
|
|
123
|
+
/* @__PURE__ */ jsx2("path", { d: "M8 20H7a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h1" }),
|
|
124
|
+
/* @__PURE__ */ jsx2("path", { d: "M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1" })
|
|
125
|
+
] });
|
|
126
|
+
}
|
|
127
|
+
function AlignRightGlyph({ size } = {}) {
|
|
128
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
129
|
+
/* @__PURE__ */ jsx2("rect", { x: "2", y: "4", width: "16", height: "6", rx: "2" }),
|
|
130
|
+
/* @__PURE__ */ jsx2("rect", { x: "9", y: "14", width: "9", height: "6", rx: "2" }),
|
|
131
|
+
/* @__PURE__ */ jsx2("path", { d: "M22 22V2" })
|
|
132
|
+
] });
|
|
133
|
+
}
|
|
134
|
+
function AlignTopGlyph({ size } = {}) {
|
|
135
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
136
|
+
/* @__PURE__ */ jsx2("rect", { x: "4", y: "6", width: "6", height: "16", rx: "2" }),
|
|
137
|
+
/* @__PURE__ */ jsx2("rect", { x: "14", y: "6", width: "6", height: "9", rx: "2" }),
|
|
138
|
+
/* @__PURE__ */ jsx2("path", { d: "M22 2H2" })
|
|
139
|
+
] });
|
|
140
|
+
}
|
|
141
|
+
function AlignVCenterGlyph({ size } = {}) {
|
|
142
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
143
|
+
/* @__PURE__ */ jsx2("path", { d: "M2 12h20" }),
|
|
144
|
+
/* @__PURE__ */ jsx2("path", { d: "M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4" }),
|
|
145
|
+
/* @__PURE__ */ jsx2("path", { d: "M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4" }),
|
|
146
|
+
/* @__PURE__ */ jsx2("path", { d: "M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1" }),
|
|
147
|
+
/* @__PURE__ */ jsx2("path", { d: "M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1" })
|
|
148
|
+
] });
|
|
149
|
+
}
|
|
150
|
+
function AlignBottomGlyph({ size } = {}) {
|
|
151
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
152
|
+
/* @__PURE__ */ jsx2("rect", { x: "4", y: "2", width: "6", height: "16", rx: "2" }),
|
|
153
|
+
/* @__PURE__ */ jsx2("rect", { x: "14", y: "9", width: "6", height: "9", rx: "2" }),
|
|
154
|
+
/* @__PURE__ */ jsx2("path", { d: "M22 22H2" })
|
|
155
|
+
] });
|
|
156
|
+
}
|
|
157
|
+
function DistributeHGlyph({ size } = {}) {
|
|
158
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
159
|
+
/* @__PURE__ */ jsx2("rect", { x: "9", y: "9", width: "6", height: "6", rx: "2" }),
|
|
160
|
+
/* @__PURE__ */ jsx2("path", { d: "M4 22V2" }),
|
|
161
|
+
/* @__PURE__ */ jsx2("path", { d: "M20 22V2" })
|
|
162
|
+
] });
|
|
163
|
+
}
|
|
164
|
+
function DistributeVGlyph({ size } = {}) {
|
|
165
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
166
|
+
/* @__PURE__ */ jsx2("rect", { x: "9", y: "9", width: "6", height: "6", rx: "2" }),
|
|
167
|
+
/* @__PURE__ */ jsx2("path", { d: "M22 20H2" }),
|
|
168
|
+
/* @__PURE__ */ jsx2("path", { d: "M22 4H2" })
|
|
169
|
+
] });
|
|
170
|
+
}
|
|
171
|
+
function BringToFrontGlyph({ size } = {}) {
|
|
172
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
173
|
+
/* @__PURE__ */ jsx2("rect", { x: "8", y: "8", width: "8", height: "8", rx: "2" }),
|
|
174
|
+
/* @__PURE__ */ jsx2("path", { d: "M4 10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2" }),
|
|
175
|
+
/* @__PURE__ */ jsx2("path", { d: "M14 20a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2" })
|
|
176
|
+
] });
|
|
177
|
+
}
|
|
178
|
+
function SendToBackGlyph({ size } = {}) {
|
|
179
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
180
|
+
/* @__PURE__ */ jsx2("rect", { x: "14", y: "14", width: "8", height: "8", rx: "2" }),
|
|
181
|
+
/* @__PURE__ */ jsx2("rect", { x: "2", y: "2", width: "8", height: "8", rx: "2" }),
|
|
182
|
+
/* @__PURE__ */ jsx2("path", { d: "M7 14v1a2 2 0 0 0 2 2h1" }),
|
|
183
|
+
/* @__PURE__ */ jsx2("path", { d: "M14 7h1a2 2 0 0 1 2 2v1" })
|
|
184
|
+
] });
|
|
185
|
+
}
|
|
186
|
+
function GroupGlyph({ size } = {}) {
|
|
187
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
188
|
+
/* @__PURE__ */ jsx2("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
|
|
189
|
+
/* @__PURE__ */ jsx2("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
|
|
190
|
+
/* @__PURE__ */ jsx2("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
|
|
191
|
+
/* @__PURE__ */ jsx2("path", { d: "M7 21H5a2 2 0 0 1-2-2v-2" }),
|
|
192
|
+
/* @__PURE__ */ jsx2("rect", { x: "7", y: "7", width: "5", height: "5", rx: "1" }),
|
|
193
|
+
/* @__PURE__ */ jsx2("rect", { x: "12", y: "12", width: "5", height: "5", rx: "1" })
|
|
194
|
+
] });
|
|
195
|
+
}
|
|
196
|
+
function UngroupGlyph({ size } = {}) {
|
|
197
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
198
|
+
/* @__PURE__ */ jsx2("rect", { x: "2", y: "4", width: "8", height: "6", rx: "1" }),
|
|
199
|
+
/* @__PURE__ */ jsx2("rect", { x: "14", y: "14", width: "8", height: "6", rx: "1" })
|
|
200
|
+
] });
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// src/icons/named.tsx
|
|
204
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
205
|
+
function NamedIcon({ name, size }) {
|
|
206
|
+
const Icon = ICONS[`icons/${name}`];
|
|
207
|
+
return Icon ? /* @__PURE__ */ jsx3(Icon, { size }) : /* @__PURE__ */ jsx3(Svg, { size, children: /* @__PURE__ */ jsx3("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" }) });
|
|
208
|
+
}
|
|
111
209
|
|
|
112
210
|
// src/edit/tree/react/icons.tsx
|
|
113
|
-
import { Fragment, jsx as
|
|
211
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
114
212
|
var PATHS = {
|
|
115
|
-
folder: /* @__PURE__ */
|
|
213
|
+
folder: /* @__PURE__ */ jsx4("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" }),
|
|
116
214
|
file: /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ jsx4("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
216
|
+
/* @__PURE__ */ jsx4("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
|
|
119
217
|
] }),
|
|
120
218
|
"folder-tree": /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ jsx4("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" }),
|
|
220
|
+
/* @__PURE__ */ jsx4("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" }),
|
|
221
|
+
/* @__PURE__ */ jsx4("path", { d: "M3 5a2 2 0 0 0 2 2h3" }),
|
|
222
|
+
/* @__PURE__ */ jsx4("path", { d: "M3 3v13a2 2 0 0 0 2 2h3" })
|
|
125
223
|
] }),
|
|
126
224
|
box: /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ jsx4("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" }),
|
|
226
|
+
/* @__PURE__ */ jsx4("path", { d: "m3.3 7 8.7 5 8.7-5" }),
|
|
227
|
+
/* @__PURE__ */ jsx4("path", { d: "M12 22V12" })
|
|
130
228
|
] }),
|
|
131
|
-
component: /* @__PURE__ */
|
|
229
|
+
component: /* @__PURE__ */ jsx4("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" }),
|
|
132
230
|
"file-text": /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ jsx4("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
232
|
+
/* @__PURE__ */ jsx4("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
233
|
+
/* @__PURE__ */ jsx4("path", { d: "M8 13h8M8 17h5" })
|
|
136
234
|
] }),
|
|
137
|
-
heading: /* @__PURE__ */
|
|
235
|
+
heading: /* @__PURE__ */ jsx4(Fragment, { children: /* @__PURE__ */ jsx4("path", { d: "M6 4v16M18 4v16M6 12h12" }) }),
|
|
138
236
|
bot: /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ jsx4("rect", { x: "3", y: "8", width: "18", height: "12", rx: "2" }),
|
|
238
|
+
/* @__PURE__ */ jsx4("path", { d: "M12 4v4M8 14h.01M16 14h.01" })
|
|
141
239
|
] }),
|
|
142
240
|
link: /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ jsx4("path", { d: "M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.8 1.7" }),
|
|
242
|
+
/* @__PURE__ */ jsx4("path", { d: "M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.8-1.7" })
|
|
145
243
|
] }),
|
|
146
244
|
"link-2-off": /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ jsx4("path", { d: "M9 17H7A5 5 0 0 1 7 7" }),
|
|
246
|
+
/* @__PURE__ */ jsx4("path", { d: "M15 7h2a5 5 0 0 1 4 8" }),
|
|
247
|
+
/* @__PURE__ */ jsx4("path", { d: "M8 12h4" }),
|
|
248
|
+
/* @__PURE__ */ jsx4("path", { d: "m2 2 20 20" })
|
|
151
249
|
] }),
|
|
152
|
-
"circle-dot": /* @__PURE__ */
|
|
250
|
+
"circle-dot": /* @__PURE__ */ jsx4("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" })
|
|
153
251
|
};
|
|
154
252
|
function TreeIcon({ name, size = 11 }) {
|
|
155
|
-
return /* @__PURE__ */
|
|
253
|
+
return /* @__PURE__ */ jsx4(Svg, { size, children: PATHS[name] ?? PATHS["circle-dot"] });
|
|
156
254
|
}
|
|
157
255
|
|
|
158
256
|
// src/edit/color/react/icons.tsx
|
|
159
|
-
import { jsx as
|
|
257
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
160
258
|
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 });
|
|
161
259
|
function EyedropperIcon({ size = 11 } = {}) {
|
|
162
260
|
return /* @__PURE__ */ jsxs3("svg", { ...svg(size), children: [
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ jsx5("path", { d: "m2 22 1-1h3l9-9" }),
|
|
262
|
+
/* @__PURE__ */ jsx5("path", { d: "M3 21v-3l9-9" }),
|
|
263
|
+
/* @__PURE__ */ jsx5("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" })
|
|
166
264
|
] });
|
|
167
265
|
}
|
|
168
266
|
function SwapIcon({ size = 11 } = {}) {
|
|
169
267
|
return /* @__PURE__ */ jsxs3("svg", { ...svg(size), children: [
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ jsx5("path", { d: "m16 3 4 4-4 4" }),
|
|
269
|
+
/* @__PURE__ */ jsx5("path", { d: "M20 7H4" }),
|
|
270
|
+
/* @__PURE__ */ jsx5("path", { d: "m8 21-4-4 4-4" }),
|
|
271
|
+
/* @__PURE__ */ jsx5("path", { d: "M4 17h16" })
|
|
174
272
|
] });
|
|
175
273
|
}
|
|
176
274
|
|
|
177
275
|
// src/edit/history/react/icons.tsx
|
|
178
276
|
import Trash from "@xenosystem/elements/elements/trash";
|
|
179
|
-
import { jsx as
|
|
277
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
180
278
|
var svgBase = (size) => ({
|
|
181
279
|
width: size,
|
|
182
280
|
height: size,
|
|
@@ -221,29 +319,29 @@ var ENTRY_PATHS = {
|
|
|
221
319
|
};
|
|
222
320
|
function EntryIcon({ name, size = 11 }) {
|
|
223
321
|
const paths = ENTRY_PATHS[name] ?? ENTRY_PATHS.generic;
|
|
224
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ jsx6("svg", { ...svgBase(size), children: paths.map((d, i) => /* @__PURE__ */ jsx6("path", { d }, i)) });
|
|
225
323
|
}
|
|
226
324
|
function XIcon({ size = 10 }) {
|
|
227
|
-
return /* @__PURE__ */
|
|
325
|
+
return /* @__PURE__ */ jsx6(XGlyph, { size });
|
|
228
326
|
}
|
|
229
327
|
var TrashIcon = fromElement(Trash);
|
|
230
328
|
function UndoIcon({ size = 11 }) {
|
|
231
329
|
return /* @__PURE__ */ jsxs4("svg", { ...svgBase(size), children: [
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ jsx6("path", { d: "M9 14 4 9l5-5" }),
|
|
331
|
+
/* @__PURE__ */ jsx6("path", { d: "M4 9h10.5a5.5 5.5 0 0 1 0 11H11" })
|
|
234
332
|
] });
|
|
235
333
|
}
|
|
236
334
|
function RedoIcon({ size = 11 }) {
|
|
237
335
|
return /* @__PURE__ */ jsxs4("svg", { ...svgBase(size), children: [
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ jsx6("path", { d: "m15 14 5-5-5-5" }),
|
|
337
|
+
/* @__PURE__ */ jsx6("path", { d: "M20 9H9.5a5.5 5.5 0 0 0 0 11H13" })
|
|
240
338
|
] });
|
|
241
339
|
}
|
|
242
340
|
|
|
243
341
|
// src/edit/inspector/react/icons.tsx
|
|
244
342
|
import Link from "@xenosystem/elements/elements/link";
|
|
245
343
|
import Copy2 from "@xenosystem/elements/elements/copy";
|
|
246
|
-
import { jsx as
|
|
344
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
247
345
|
var base = (size) => ({
|
|
248
346
|
width: size,
|
|
249
347
|
height: size,
|
|
@@ -257,39 +355,39 @@ var base = (size) => ({
|
|
|
257
355
|
});
|
|
258
356
|
function StopwatchIcon({ size = 11 }) {
|
|
259
357
|
return /* @__PURE__ */ jsxs5("svg", { ...base(size), children: [
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ jsx7("path", { d: "M10 2h4" }),
|
|
359
|
+
/* @__PURE__ */ jsx7("path", { d: "M12 14v-4" }),
|
|
360
|
+
/* @__PURE__ */ jsx7("path", { d: "M20 14a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z" })
|
|
263
361
|
] });
|
|
264
362
|
}
|
|
265
363
|
function DiamondIcon({ size = 9, filled = false }) {
|
|
266
|
-
return /* @__PURE__ */
|
|
364
|
+
return /* @__PURE__ */ jsx7("svg", { ...base(size), fill: filled ? "currentColor" : "none", children: /* @__PURE__ */ jsx7("path", { d: "m12 3 7 9-7 9-7-9z" }) });
|
|
267
365
|
}
|
|
268
366
|
function PrevIcon({ size = 9 }) {
|
|
269
|
-
return /* @__PURE__ */
|
|
367
|
+
return /* @__PURE__ */ jsx7("svg", { ...base(size), children: /* @__PURE__ */ jsx7("path", { d: "m15 18-6-6 6-6" }) });
|
|
270
368
|
}
|
|
271
369
|
function NextIcon({ size = 9 }) {
|
|
272
|
-
return /* @__PURE__ */
|
|
370
|
+
return /* @__PURE__ */ jsx7("svg", { ...base(size), children: /* @__PURE__ */ jsx7("path", { d: "m9 18 6-6-6-6" }) });
|
|
273
371
|
}
|
|
274
372
|
var LinkIcon = fromElement(Link, 10);
|
|
275
373
|
var CopyIcon = fromElement(Copy2, 10);
|
|
276
374
|
function ResetIcon({ size = 10 }) {
|
|
277
375
|
return /* @__PURE__ */ jsxs5("svg", { ...base(size), children: [
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ jsx7("path", { d: "M3 12a9 9 0 1 0 3-6.7L3 8" }),
|
|
377
|
+
/* @__PURE__ */ jsx7("path", { d: "M3 3v5h5" })
|
|
280
378
|
] });
|
|
281
379
|
}
|
|
282
380
|
function XIcon2({ size = 10 }) {
|
|
283
381
|
return /* @__PURE__ */ jsxs5("svg", { ...base(size), children: [
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ jsx7("path", { d: "M18 6 6 18" }),
|
|
383
|
+
/* @__PURE__ */ jsx7("path", { d: "m6 6 12 12" })
|
|
286
384
|
] });
|
|
287
385
|
}
|
|
288
386
|
|
|
289
387
|
// src/edit/layers/react/icons.tsx
|
|
290
388
|
import Eye from "@xenosystem/elements/elements/eye";
|
|
291
389
|
import EyeOff from "@xenosystem/elements/elements/eye-off";
|
|
292
|
-
import { jsx as
|
|
390
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
293
391
|
var base2 = (size) => ({
|
|
294
392
|
width: size,
|
|
295
393
|
height: size,
|
|
@@ -305,31 +403,31 @@ var EyeIcon = fromElement(Eye, 12);
|
|
|
305
403
|
var EyeOffIcon = fromElement(EyeOff, 12);
|
|
306
404
|
function LockIcon({ size = 12, className }) {
|
|
307
405
|
return /* @__PURE__ */ jsxs6("svg", { ...base2(size), className, children: [
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ jsx8("rect", { width: "14", height: "10", x: "5", y: "11", rx: "2" }),
|
|
407
|
+
/* @__PURE__ */ jsx8("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" })
|
|
310
408
|
] });
|
|
311
409
|
}
|
|
312
410
|
function UnlockIcon({ size = 12, className }) {
|
|
313
411
|
return /* @__PURE__ */ jsxs6("svg", { ...base2(size), className, children: [
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ jsx8("rect", { width: "14", height: "10", x: "5", y: "11", rx: "2" }),
|
|
413
|
+
/* @__PURE__ */ jsx8("path", { d: "M8 11V7a4 4 0 0 1 7.5-2" })
|
|
316
414
|
] });
|
|
317
415
|
}
|
|
318
416
|
function KindGlyph({ size = 10 }) {
|
|
319
|
-
return /* @__PURE__ */
|
|
417
|
+
return /* @__PURE__ */ jsx8("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__ */ jsx8("rect", { x: "4", y: "4", width: "16", height: "16", rx: "2" }) });
|
|
320
418
|
}
|
|
321
419
|
function VisibilityIcon({ open, size }) {
|
|
322
|
-
return open ? /* @__PURE__ */
|
|
420
|
+
return open ? /* @__PURE__ */ jsx8(EyeIcon, { size }) : /* @__PURE__ */ jsx8(EyeOffIcon, { size });
|
|
323
421
|
}
|
|
324
422
|
function LockStateIcon({ locked, size }) {
|
|
325
|
-
return locked ? /* @__PURE__ */
|
|
423
|
+
return locked ? /* @__PURE__ */ jsx8(LockIcon, { size }) : /* @__PURE__ */ jsx8(UnlockIcon, { size });
|
|
326
424
|
}
|
|
327
425
|
|
|
328
426
|
// src/time/transport/react/icons.tsx
|
|
329
427
|
import Pause from "@xenosystem/elements/elements/pause";
|
|
330
428
|
import Play from "@xenosystem/elements/elements/play";
|
|
331
429
|
import Stop from "@xenosystem/elements/elements/stop";
|
|
332
|
-
import { jsx as
|
|
430
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
333
431
|
var base3 = (size) => ({
|
|
334
432
|
width: size,
|
|
335
433
|
height: size,
|
|
@@ -345,54 +443,54 @@ var PlayIcon = fromElement(Play, 12);
|
|
|
345
443
|
var PauseIcon = fromElement(Pause, 12);
|
|
346
444
|
var StopIcon = fromElement(Stop);
|
|
347
445
|
function RecordIcon({ size = 11 }) {
|
|
348
|
-
return /* @__PURE__ */
|
|
446
|
+
return /* @__PURE__ */ jsx9("svg", { ...base3(size), fill: "currentColor", stroke: "none", children: /* @__PURE__ */ jsx9("rect", { x: "6", y: "6", width: "12", height: "12", rx: "3" }) });
|
|
349
447
|
}
|
|
350
448
|
function StartIcon({ size = 11 }) {
|
|
351
449
|
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ jsx9("path", { d: "M19 20 9 12l10-8z" }),
|
|
451
|
+
/* @__PURE__ */ jsx9("path", { d: "M5 19V5" })
|
|
354
452
|
] });
|
|
355
453
|
}
|
|
356
454
|
function EndIcon({ size = 11 }) {
|
|
357
455
|
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ jsx9("path", { d: "m5 4 10 8-10 8z" }),
|
|
457
|
+
/* @__PURE__ */ jsx9("path", { d: "M19 5v14" })
|
|
360
458
|
] });
|
|
361
459
|
}
|
|
362
460
|
function StepBackIcon({ size = 11 }) {
|
|
363
|
-
return /* @__PURE__ */
|
|
461
|
+
return /* @__PURE__ */ jsx9("svg", { ...base3(size), children: /* @__PURE__ */ jsx9("path", { d: "M15 18 9 12l6-6" }) });
|
|
364
462
|
}
|
|
365
463
|
function StepForwardIcon({ size = 11 }) {
|
|
366
|
-
return /* @__PURE__ */
|
|
464
|
+
return /* @__PURE__ */ jsx9("svg", { ...base3(size), children: /* @__PURE__ */ jsx9("path", { d: "m9 6 6 6-6 6" }) });
|
|
367
465
|
}
|
|
368
466
|
function ShuttleLeftIcon({ size = 11 }) {
|
|
369
467
|
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ jsx9("path", { d: "M11 19 2 12l9-7z" }),
|
|
469
|
+
/* @__PURE__ */ jsx9("path", { d: "M22 19l-9-7 9-7z" })
|
|
372
470
|
] });
|
|
373
471
|
}
|
|
374
472
|
function ShuttleRightIcon({ size = 11 }) {
|
|
375
473
|
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ jsx9("path", { d: "m13 19 9-7-9-7z" }),
|
|
475
|
+
/* @__PURE__ */ jsx9("path", { d: "m2 19 9-7-9-7z" })
|
|
378
476
|
] });
|
|
379
477
|
}
|
|
380
478
|
function LoopIcon({ size = 11 }) {
|
|
381
479
|
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ jsx9("path", { d: "m17 2 4 4-4 4" }),
|
|
481
|
+
/* @__PURE__ */ jsx9("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
|
|
482
|
+
/* @__PURE__ */ jsx9("path", { d: "m7 22-4-4 4-4" }),
|
|
483
|
+
/* @__PURE__ */ jsx9("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
|
|
386
484
|
] });
|
|
387
485
|
}
|
|
388
486
|
function MetronomeIcon({ size = 11 }) {
|
|
389
487
|
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ jsx9("path", { d: "M9 3h6l4 18H5z" }),
|
|
489
|
+
/* @__PURE__ */ jsx9("path", { d: "m12 18 4-11" })
|
|
392
490
|
] });
|
|
393
491
|
}
|
|
394
492
|
function PlayPauseIcon({ playing, size }) {
|
|
395
|
-
return playing ? /* @__PURE__ */
|
|
493
|
+
return playing ? /* @__PURE__ */ jsx9(PauseIcon, { size }) : /* @__PURE__ */ jsx9(PlayIcon, { size });
|
|
396
494
|
}
|
|
397
495
|
var TRANSPORT_ICONS = {
|
|
398
496
|
"transport/PlayIcon": PlayIcon,
|
|
@@ -464,7 +562,22 @@ var ICONS = Object.freeze({
|
|
|
464
562
|
"icons/Case": CaseGlyph,
|
|
465
563
|
"icons/WholeWord": WholeWordGlyph,
|
|
466
564
|
"icons/Regex": RegexGlyph,
|
|
467
|
-
"icons/TreeKind": TreeIcon
|
|
565
|
+
"icons/TreeKind": TreeIcon,
|
|
566
|
+
// arrange (glyphs.tsx) — a section action names one by key: `icon: 'AlignLeft'`
|
|
567
|
+
"icons/AlignLeft": AlignLeftGlyph,
|
|
568
|
+
"icons/AlignHCenter": AlignHCenterGlyph,
|
|
569
|
+
"icons/AlignRight": AlignRightGlyph,
|
|
570
|
+
"icons/AlignTop": AlignTopGlyph,
|
|
571
|
+
"icons/AlignVCenter": AlignVCenterGlyph,
|
|
572
|
+
"icons/AlignBottom": AlignBottomGlyph,
|
|
573
|
+
"icons/DistributeH": DistributeHGlyph,
|
|
574
|
+
"icons/DistributeV": DistributeVGlyph,
|
|
575
|
+
"icons/BringToFront": BringToFrontGlyph,
|
|
576
|
+
"icons/SendToBack": SendToBackGlyph,
|
|
577
|
+
"icons/Group": GroupGlyph,
|
|
578
|
+
"icons/Ungroup": UngroupGlyph,
|
|
579
|
+
/** A registry icon by NAME (`name: 'AlignLeft'` -> `icons/AlignLeft`), for data that names an icon. */
|
|
580
|
+
"icons/Named": NamedIcon
|
|
468
581
|
});
|
|
469
582
|
var ICON_UNITS = Object.keys(ICONS);
|
|
470
583
|
|
|
@@ -478,6 +591,7 @@ export {
|
|
|
478
591
|
SortDescGlyph,
|
|
479
592
|
ExpandGlyph,
|
|
480
593
|
CollapseGlyph,
|
|
594
|
+
NamedIcon,
|
|
481
595
|
TreeIcon,
|
|
482
596
|
EyedropperIcon,
|
|
483
597
|
SwapIcon,
|
package/dist/data/index.js
CHANGED
package/dist/edit/index.d.ts
CHANGED
|
@@ -1019,6 +1019,7 @@ interface XenoInspectorField {
|
|
|
1019
1019
|
interface XenoSectionAction {
|
|
1020
1020
|
id: string;
|
|
1021
1021
|
label: string;
|
|
1022
|
+
/** A registry icon by key (`'AlignLeft'` → `icons/AlignLeft`, see `icons/index.ts`). Absent ⇒ the label's first letter. */
|
|
1022
1023
|
icon?: string;
|
|
1023
1024
|
disabled?: boolean;
|
|
1024
1025
|
}
|
|
@@ -1722,6 +1723,7 @@ interface InspectorViewSection {
|
|
|
1722
1723
|
sectionId: string;
|
|
1723
1724
|
label: string;
|
|
1724
1725
|
glyph: string;
|
|
1726
|
+
icon: string | null;
|
|
1725
1727
|
disabled?: boolean;
|
|
1726
1728
|
}[];
|
|
1727
1729
|
hasAddMenu: boolean;
|
package/dist/edit/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
KindGlyph,
|
|
10
10
|
LinkIcon,
|
|
11
11
|
LockStateIcon,
|
|
12
|
+
NamedIcon,
|
|
12
13
|
NextIcon,
|
|
13
14
|
PrevIcon,
|
|
14
15
|
RedoIcon,
|
|
@@ -22,7 +23,7 @@ import {
|
|
|
22
23
|
VisibilityIcon,
|
|
23
24
|
XIcon,
|
|
24
25
|
XIcon2
|
|
25
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-6STT7CAM.js";
|
|
26
27
|
import "../chunk-2KG3PWR4.js";
|
|
27
28
|
|
|
28
29
|
// src/edit/layers/panel.ts
|
|
@@ -3039,7 +3040,7 @@ function inspectorViewState(c) {
|
|
|
3039
3040
|
hasEnabled: s.enabled !== void 0,
|
|
3040
3041
|
enabled: s.enabled?.value,
|
|
3041
3042
|
badge: s.badge,
|
|
3042
|
-
actions: (s.actions ?? []).map((a) => ({ id: a.id, sectionId: s.id, label: a.label, glyph: a.label.slice(0, 1), disabled: a.disabled })),
|
|
3043
|
+
actions: (s.actions ?? []).map((a) => ({ id: a.id, sectionId: s.id, label: a.label, glyph: a.label.slice(0, 1), icon: a.icon ?? null, disabled: a.disabled })),
|
|
3043
3044
|
hasAddMenu: !!s.addMenu && s.addMenu.length > 0,
|
|
3044
3045
|
hasActions: (s.actions?.length ?? 0) > 0 || !!s.addMenu && s.addMenu.length > 0,
|
|
3045
3046
|
addLabel: `Add to ${s.title}`,
|
|
@@ -3209,7 +3210,7 @@ var INSPECTOR_DECLARATION = {
|
|
|
3209
3210
|
{
|
|
3210
3211
|
component: "chrome/IconButton",
|
|
3211
3212
|
each: { item: "actions", key: "id" },
|
|
3212
|
-
props: { size: { value: "sm" }, icon: { node: { component: "inspector/ActionGlyph", props: { glyph: { item: "glyph" } } } }, label: { item: "label" }, disabled: { item: "disabled" } },
|
|
3213
|
+
props: { size: { value: "sm" }, icon: { node: { component: "fragment", children: [{ component: "icons/Named", when: { item: "icon" }, props: { name: { item: "icon" } } }, { component: "inspector/ActionGlyph", when: { not: { item: "icon" } }, props: { glyph: { item: "glyph" } } }] } }, label: { item: "label" }, disabled: { item: "disabled" } },
|
|
3213
3214
|
on: { onClick: ui2("runAction", { sectionId: { item: "sectionId" }, actionId: { item: "id" } }) }
|
|
3214
3215
|
},
|
|
3215
3216
|
{
|
|
@@ -3698,7 +3699,7 @@ function SectionView({ section, controller }) {
|
|
|
3698
3699
|
onEnabledChange: () => ui10({ kind: "toggleSectionEnabled", sectionId: section.id }),
|
|
3699
3700
|
badge: section.badge ? /* @__PURE__ */ jsx4(Badge2, { children: section.badge }) : null,
|
|
3700
3701
|
actions: hasActions ? /* @__PURE__ */ jsxs3(Fragment4, { children: [
|
|
3701
|
-
section.actions.map((action) => /* @__PURE__ */ jsx4(IconButton3, { size: "sm", icon: /* @__PURE__ */ jsx4(ActionGlyph, { glyph: action.glyph }), label: action.label, disabled: action.disabled, onClick: () => ui10({ kind: "runAction", sectionId: section.id, actionId: action.id }) }, action.id)),
|
|
3702
|
+
section.actions.map((action) => /* @__PURE__ */ jsx4(IconButton3, { size: "sm", icon: action.icon ? /* @__PURE__ */ jsx4(NamedIcon, { name: action.icon }) : /* @__PURE__ */ jsx4(ActionGlyph, { glyph: action.glyph }), label: action.label, disabled: action.disabled, onClick: () => ui10({ kind: "runAction", sectionId: section.id, actionId: action.id }) }, action.id)),
|
|
3702
3703
|
section.hasAddMenu ? /* @__PURE__ */ jsx4(Menu2, { size: "sm", trigger: "\uFF0B", items: section.addItems, label: section.addLabel, align: "end", onSelect: (id) => ui10({ kind: "addItem", sectionId: section.id, itemId: id }) }) : null
|
|
3703
3704
|
] }) : null,
|
|
3704
3705
|
children: [
|
package/dist/icons/index.js
CHANGED
package/dist/ops/index.d.ts
CHANGED
|
@@ -449,6 +449,8 @@ declare class ConsoleController {
|
|
|
449
449
|
/** Collapse adjacent duplicates. */
|
|
450
450
|
setCollapse(collapse: boolean): void;
|
|
451
451
|
/** Drop every record. Emits nothing — clearing a view is not an event a host acts on. */
|
|
452
|
+
/** Ask the host to recompute the records (a lint, an audit) — nothing changes here until it pushes. */
|
|
453
|
+
requestRefresh(): void;
|
|
452
454
|
clear(): void;
|
|
453
455
|
/**
|
|
454
456
|
* A record was opened.
|
|
@@ -486,6 +488,7 @@ interface ConsoleRenderContext {
|
|
|
486
488
|
rowHeight: number;
|
|
487
489
|
showTimestamps: boolean;
|
|
488
490
|
emptyHint?: string;
|
|
491
|
+
showRefresh?: boolean;
|
|
489
492
|
};
|
|
490
493
|
}
|
|
491
494
|
/** Options for {@link createConsolePanel}. */
|
|
@@ -563,6 +566,7 @@ interface ConsoleViewModel {
|
|
|
563
566
|
errors?: string;
|
|
564
567
|
warns?: string;
|
|
565
568
|
multiSource: boolean;
|
|
569
|
+
showRefresh: boolean;
|
|
566
570
|
sources: ConsoleViewSource[];
|
|
567
571
|
empty: boolean;
|
|
568
572
|
emptyTitle: string;
|
|
@@ -585,6 +589,8 @@ type ConsoleUiIntent = {
|
|
|
585
589
|
kind: 'copyVisible';
|
|
586
590
|
} | {
|
|
587
591
|
kind: 'clear';
|
|
592
|
+
} | {
|
|
593
|
+
kind: 'refresh';
|
|
588
594
|
} | {
|
|
589
595
|
kind: 'source';
|
|
590
596
|
id: string;
|
|
@@ -602,6 +608,7 @@ interface ConsoleViewOptions {
|
|
|
602
608
|
rowHeight?: number;
|
|
603
609
|
showTimestamps?: boolean;
|
|
604
610
|
emptyHint?: string;
|
|
611
|
+
showRefresh?: boolean;
|
|
605
612
|
}
|
|
606
613
|
/** Derive the view from the live controller — the runtime calls this on every draw. */
|
|
607
614
|
declare function consoleViewState(c: ConsoleController, options?: ConsoleViewOptions): ConsoleViewModel;
|
package/dist/ops/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
ICONS,
|
|
11
11
|
PlusGlyph,
|
|
12
12
|
XGlyph
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-6STT7CAM.js";
|
|
14
14
|
import "../chunk-2KG3PWR4.js";
|
|
15
15
|
|
|
16
16
|
// src/ops/console/panel.ts
|
|
@@ -422,6 +422,10 @@ var ConsoleController = class {
|
|
|
422
422
|
this.notify();
|
|
423
423
|
}
|
|
424
424
|
/** Drop every record. Emits nothing — clearing a view is not an event a host acts on. */
|
|
425
|
+
/** Ask the host to recompute the records (a lint, an audit) — nothing changes here until it pushes. */
|
|
426
|
+
requestRefresh() {
|
|
427
|
+
this.host.emit("refreshRequest", {});
|
|
428
|
+
}
|
|
425
429
|
clear() {
|
|
426
430
|
this.records = [];
|
|
427
431
|
this.dropped = 0;
|
|
@@ -522,6 +526,12 @@ var consoleManifest = {
|
|
|
522
526
|
name: "Context Menu Request",
|
|
523
527
|
type: "object",
|
|
524
528
|
description: "The host opens its own menu."
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
id: "refreshRequest",
|
|
532
|
+
name: "Refresh Requested",
|
|
533
|
+
type: "object",
|
|
534
|
+
description: "{} \u2014 the person pressed Refresh (config `showRefresh`), so a host whose records are a COMPUTATION (a lint, an audit, a query) re-runs it and pushes a `replace`. A live stream never shows the button."
|
|
525
535
|
}
|
|
526
536
|
],
|
|
527
537
|
commands: [
|
|
@@ -558,6 +568,13 @@ var consoleManifest = {
|
|
|
558
568
|
}
|
|
559
569
|
],
|
|
560
570
|
config: [
|
|
571
|
+
{
|
|
572
|
+
key: "showRefresh",
|
|
573
|
+
label: "Refresh button",
|
|
574
|
+
type: "boolean",
|
|
575
|
+
defaultValue: false,
|
|
576
|
+
description: "For records that are computed on demand rather than streamed: a Refresh button that emits `refreshRequest`."
|
|
577
|
+
},
|
|
561
578
|
{
|
|
562
579
|
key: "maxRecords",
|
|
563
580
|
label: "Buffer size",
|
|
@@ -667,6 +684,7 @@ function consoleViewState(c, options = {}) {
|
|
|
667
684
|
errors: s.counts.error > 0 ? String(s.counts.error) : void 0,
|
|
668
685
|
warns: s.counts.warn > 0 ? String(s.counts.warn) : void 0,
|
|
669
686
|
multiSource: s.sources.length > 1,
|
|
687
|
+
showRefresh: options.showRefresh === true,
|
|
670
688
|
sources: s.sources.map((src) => ({ id: src.id, label: src.label ?? src.id, on: src.enabled, title: `${src.count} records` })),
|
|
671
689
|
empty: s.rows.length === 0,
|
|
672
690
|
emptyTitle: s.total > 0 ? "No matches" : "No output",
|
|
@@ -705,6 +723,9 @@ function applyConsoleUi(c, intent) {
|
|
|
705
723
|
case "clear":
|
|
706
724
|
c.clear();
|
|
707
725
|
break;
|
|
726
|
+
case "refresh":
|
|
727
|
+
c.requestRefresh();
|
|
728
|
+
break;
|
|
708
729
|
case "source":
|
|
709
730
|
c.toggleSource(intent.id, intent.on);
|
|
710
731
|
break;
|
|
@@ -725,7 +746,7 @@ var consoleViewManifest = {
|
|
|
725
746
|
outputs: [{ id: "ui", name: "UI intent", type: "object", description: "{ kind, \u2026 } \u2014 applied by the runtime to the controller." }],
|
|
726
747
|
commands: []
|
|
727
748
|
};
|
|
728
|
-
var EMPTY = { search: "", levels: [], level: "trace", multiSource: false, sources: [], empty: true, emptyTitle: "No output", emptyHint: "Run something to see its output here.", listed: false, rowHeight: 20, totalHeight: 0, offsetTop: 0, rows: [], countLabel: "0 of 0" };
|
|
749
|
+
var EMPTY = { search: "", levels: [], level: "trace", multiSource: false, showRefresh: false, sources: [], empty: true, emptyTitle: "No output", emptyHint: "Run something to see its output here.", listed: false, rowHeight: 20, totalHeight: 0, offsetTop: 0, rows: [], countLabel: "0 of 0" };
|
|
729
750
|
var BEHAVIOURS = {
|
|
730
751
|
"ops/consolePanelView": (inputs) => inputs.view ?? EMPTY
|
|
731
752
|
};
|
|
@@ -758,6 +779,7 @@ var CONSOLE_DECLARATION = {
|
|
|
758
779
|
children: [
|
|
759
780
|
{ component: "chrome/Badge", when: { input: "view.errors" }, props: { tone: { value: "error" } }, children: [text({ input: "view.errors" })] },
|
|
760
781
|
{ component: "chrome/Badge", when: { input: "view.warns" }, props: { tone: { value: "warning" } }, children: [text({ input: "view.warns" })] },
|
|
782
|
+
{ component: "chrome/IconButton", when: { input: "view.showRefresh" }, props: { icon: { node: { component: "icons/Refresh" } }, label: { value: "Refresh" } }, on: { onClick: ui("refresh") } },
|
|
761
783
|
{ component: "chrome/IconButton", props: { icon: { node: { component: "icons/Copy" } }, label: { value: "Copy visible" } }, on: { onClick: ui("copyVisible") } },
|
|
762
784
|
{ component: "chrome/IconButton", props: { icon: { node: { component: "icons/Clear" } }, label: { value: "Clear" } }, on: { onClick: ui("clear") } }
|
|
763
785
|
]
|
|
@@ -828,6 +850,7 @@ var CONSOLE_DECLARATION = {
|
|
|
828
850
|
// src/ops/console/react/ConsolePanelView.tsx
|
|
829
851
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
830
852
|
var CopyGlyph = ICONS["icons/Copy"];
|
|
853
|
+
var RefreshGlyph = ICONS["icons/Refresh"];
|
|
831
854
|
var ClearGlyph = ICONS["icons/Clear"];
|
|
832
855
|
function ConsoleScroller({ controller, rowHeight = 20, children }) {
|
|
833
856
|
const state = useSyncExternalStore(controller.subscribe, controller.getState, controller.getState);
|
|
@@ -882,6 +905,7 @@ function ConsolePanelView({ controller, ...options }) {
|
|
|
882
905
|
right: /* @__PURE__ */ jsxs(ToolbarGroup, { end: true, children: [
|
|
883
906
|
view.errors ? /* @__PURE__ */ jsx(Badge, { tone: "error", children: view.errors }) : null,
|
|
884
907
|
view.warns ? /* @__PURE__ */ jsx(Badge, { tone: "warning", children: view.warns }) : null,
|
|
908
|
+
view.showRefresh ? /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(RefreshGlyph, {}), label: "Refresh", onClick: () => ui5({ kind: "refresh" }) }) : null,
|
|
885
909
|
/* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(CopyGlyph, {}), label: "Copy visible", onClick: () => ui5({ kind: "copyVisible" }) }),
|
|
886
910
|
/* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(ClearGlyph, {}), label: "Clear", onClick: () => ui5({ kind: "clear" }) })
|
|
887
911
|
] })
|
|
@@ -935,7 +959,8 @@ function createConsolePanel(options = {}) {
|
|
|
935
959
|
const resolve = (config2) => ({
|
|
936
960
|
rowHeight: numberConfig(config2.rowHeight, 20),
|
|
937
961
|
showTimestamps: config2.showTimestamps !== false,
|
|
938
|
-
emptyHint: typeof config2.emptyHint === "string" ? config2.emptyHint : void 0
|
|
962
|
+
emptyHint: typeof config2.emptyHint === "string" ? config2.emptyHint : void 0,
|
|
963
|
+
showRefresh: config2.showRefresh === true
|
|
939
964
|
});
|
|
940
965
|
let renderConfig = resolve(host.config ?? {});
|
|
941
966
|
let unrender = null;
|
package/dist/time/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenosystem/blocks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.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",
|