@xenosystem/blocks 0.15.3 → 0.16.1
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 +6 -3
- package/dist/edit/index.js +7 -5
- package/dist/icons/index.js +1 -1
- package/dist/ops/index.js +1 -1
- 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
|
}
|
|
@@ -1198,9 +1199,10 @@ declare function fieldMatches(field: XenoInspectorField, term: string): boolean;
|
|
|
1198
1199
|
/**
|
|
1199
1200
|
* Project a schema into renderable sections.
|
|
1200
1201
|
*
|
|
1201
|
-
* Visibility-by-data: a section is dropped entirely when it has no matching fields AND
|
|
1202
|
-
* `emptyHint` — the panel never renders an empty box the
|
|
1203
|
-
*
|
|
1202
|
+
* Visibility-by-data: a section is dropped entirely when it has no matching fields AND nothing to
|
|
1203
|
+
* act on — no `emptyHint`, no `actions`, no `addMenu` — the panel never renders an empty box the
|
|
1204
|
+
* user cannot act on. (An action-only section — Canvas's align strip — IS something to act on.)
|
|
1205
|
+
* While a filter is active, fieldless sections are dropped regardless (they are not search results).
|
|
1204
1206
|
*/
|
|
1205
1207
|
declare function projectSections(schema: XenoInspectorSchema, options?: ProjectOptions$1): ProjectedSection[];
|
|
1206
1208
|
/** Whether a section is collapsed, honoring `defaultCollapsed` for sections the user never touched. */
|
|
@@ -1722,6 +1724,7 @@ interface InspectorViewSection {
|
|
|
1722
1724
|
sectionId: string;
|
|
1723
1725
|
label: string;
|
|
1724
1726
|
glyph: string;
|
|
1727
|
+
icon: string | null;
|
|
1725
1728
|
disabled?: boolean;
|
|
1726
1729
|
}[];
|
|
1727
1730
|
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
|
|
@@ -1969,7 +1970,8 @@ function projectSections(schema, options = {}) {
|
|
|
1969
1970
|
for (const section of schema.sections) {
|
|
1970
1971
|
const fields = filtering ? section.fields.filter((f) => fieldMatches(f, term)) : section.fields;
|
|
1971
1972
|
const empty = fields.length === 0;
|
|
1972
|
-
|
|
1973
|
+
const actionable = !!section.emptyHint || (section.actions?.length ?? 0) > 0 || (section.addMenu?.length ?? 0) > 0;
|
|
1974
|
+
if (empty && (filtering || !actionable)) continue;
|
|
1973
1975
|
const collapsed = !filtering && !!section.collapsible && isCollapsed(section, collapsedSet);
|
|
1974
1976
|
out.push({
|
|
1975
1977
|
section,
|
|
@@ -3039,7 +3041,7 @@ function inspectorViewState(c) {
|
|
|
3039
3041
|
hasEnabled: s.enabled !== void 0,
|
|
3040
3042
|
enabled: s.enabled?.value,
|
|
3041
3043
|
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 })),
|
|
3044
|
+
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
3045
|
hasAddMenu: !!s.addMenu && s.addMenu.length > 0,
|
|
3044
3046
|
hasActions: (s.actions?.length ?? 0) > 0 || !!s.addMenu && s.addMenu.length > 0,
|
|
3045
3047
|
addLabel: `Add to ${s.title}`,
|
|
@@ -3209,7 +3211,7 @@ var INSPECTOR_DECLARATION = {
|
|
|
3209
3211
|
{
|
|
3210
3212
|
component: "chrome/IconButton",
|
|
3211
3213
|
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" } },
|
|
3214
|
+
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
3215
|
on: { onClick: ui2("runAction", { sectionId: { item: "sectionId" }, actionId: { item: "id" } }) }
|
|
3214
3216
|
},
|
|
3215
3217
|
{
|
|
@@ -3698,7 +3700,7 @@ function SectionView({ section, controller }) {
|
|
|
3698
3700
|
onEnabledChange: () => ui10({ kind: "toggleSectionEnabled", sectionId: section.id }),
|
|
3699
3701
|
badge: section.badge ? /* @__PURE__ */ jsx4(Badge2, { children: section.badge }) : null,
|
|
3700
3702
|
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)),
|
|
3703
|
+
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
3704
|
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
3705
|
] }) : null,
|
|
3704
3706
|
children: [
|
package/dist/icons/index.js
CHANGED
package/dist/ops/index.js
CHANGED
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.1",
|
|
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",
|