@xenosystem/blocks 0.13.11 → 0.13.13
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-6XVFYPVH.js +511 -0
- package/dist/data/index.js +2 -4
- package/dist/edit/index.js +5 -7
- package/dist/icons/index.js +2 -4
- package/dist/ops/index.d.ts +231 -19
- package/dist/ops/index.js +590 -372
- package/dist/time/index.js +1 -2
- package/package.json +3 -3
- package/dist/chunk-K7YLLV2W.js +0 -132
- package/dist/chunk-W4PTX2Y4.js +0 -414
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
// src/icons/glyphs.tsx
|
|
2
|
+
import Copy from "@xenosystem/elements/elements/copy";
|
|
3
|
+
import Download from "@xenosystem/elements/elements/download";
|
|
4
|
+
import Plus from "@xenosystem/elements/elements/plus";
|
|
5
|
+
import Refresh from "@xenosystem/elements/elements/refresh";
|
|
6
|
+
import X from "@xenosystem/elements/elements/x";
|
|
7
|
+
|
|
8
|
+
// src/icons/elements.tsx
|
|
9
|
+
import { XenoElement } from "@xenosystem/elements-react";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
var GLYPH_STROKE_WIDTH = 1.5;
|
|
12
|
+
function fromElement(decl, defaultSize = 11, state) {
|
|
13
|
+
const Glyph = ({ size = defaultSize, className }) => /* @__PURE__ */ jsx(XenoElement, { decl, state, size, strokeWidth: GLYPH_STROKE_WIDTH, className, "aria-hidden": "true", role: void 0, "aria-label": void 0 });
|
|
14
|
+
Glyph.displayName = `Element(${decl.id})`;
|
|
15
|
+
return Glyph;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// src/icons/glyphs.tsx
|
|
19
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
20
|
+
function Svg({ children, size = 11 }) {
|
|
21
|
+
return /* @__PURE__ */ jsx2("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 });
|
|
22
|
+
}
|
|
23
|
+
var RefreshGlyph = fromElement(Refresh);
|
|
24
|
+
var XGlyph = fromElement(X);
|
|
25
|
+
var PlusGlyph = fromElement(Plus);
|
|
26
|
+
function ChevronGlyph({ direction = "right", size } = {}) {
|
|
27
|
+
const d = direction === "left" ? "m15 18-6-6 6-6" : direction === "up" ? "m18 15-6-6-6 6" : direction === "down" ? "m6 9 6 6 6-6" : "m9 18 6-6-6-6";
|
|
28
|
+
return /* @__PURE__ */ jsx2(Svg, { size, children: /* @__PURE__ */ jsx2("path", { d }) });
|
|
29
|
+
}
|
|
30
|
+
var DownloadGlyph = fromElement(Download);
|
|
31
|
+
function PlugGlyph({ size } = {}) {
|
|
32
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
33
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 22v-5" }),
|
|
34
|
+
/* @__PURE__ */ jsx2("path", { d: "M9 8V2M15 8V2" }),
|
|
35
|
+
/* @__PURE__ */ jsx2("path", { d: "M18 8v3a6 6 0 0 1-12 0V8Z" })
|
|
36
|
+
] });
|
|
37
|
+
}
|
|
38
|
+
function SortAscGlyph({ size = 9 } = {}) {
|
|
39
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
40
|
+
/* @__PURE__ */ jsx2("path", { d: "m5 12 7-7 7 7" }),
|
|
41
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 19V5" })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
function SortDescGlyph({ size = 9 } = {}) {
|
|
45
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
46
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 5v14" }),
|
|
47
|
+
/* @__PURE__ */ jsx2("path", { d: "m19 12-7 7-7-7" })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
function ExpandGlyph({ size } = {}) {
|
|
51
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
52
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 22v-6" }),
|
|
53
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 8V2" }),
|
|
54
|
+
/* @__PURE__ */ jsx2("path", { d: "m9 5 3-3 3 3" }),
|
|
55
|
+
/* @__PURE__ */ jsx2("path", { d: "m9 19 3 3 3-3" }),
|
|
56
|
+
/* @__PURE__ */ jsx2("path", { d: "M4 12H2" }),
|
|
57
|
+
/* @__PURE__ */ jsx2("path", { d: "M10 12H8" }),
|
|
58
|
+
/* @__PURE__ */ jsx2("path", { d: "M16 12h-2" }),
|
|
59
|
+
/* @__PURE__ */ jsx2("path", { d: "M22 12h-2" })
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
function CollapseGlyph({ size } = {}) {
|
|
63
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
64
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 22v-6" }),
|
|
65
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 8V2" }),
|
|
66
|
+
/* @__PURE__ */ jsx2("path", { d: "m9 13 3 3 3-3" }),
|
|
67
|
+
/* @__PURE__ */ jsx2("path", { d: "m9 11 3-3 3 3" }),
|
|
68
|
+
/* @__PURE__ */ jsx2("path", { d: "M4 12H2" }),
|
|
69
|
+
/* @__PURE__ */ jsx2("path", { d: "M22 12h-2" })
|
|
70
|
+
] });
|
|
71
|
+
}
|
|
72
|
+
var CopyGlyph = fromElement(Copy);
|
|
73
|
+
function ClearGlyph({ size } = {}) {
|
|
74
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
75
|
+
/* @__PURE__ */ jsx2("rect", { x: "3", y: "3", width: "18", height: "18", rx: "3" }),
|
|
76
|
+
/* @__PURE__ */ jsx2("path", { d: "m6 6 12 12" })
|
|
77
|
+
] });
|
|
78
|
+
}
|
|
79
|
+
function CancelGlyph({ size } = {}) {
|
|
80
|
+
return /* @__PURE__ */ jsx2(Svg, { size, children: /* @__PURE__ */ jsx2("rect", { x: "5", y: "5", width: "14", height: "14", rx: "2" }) });
|
|
81
|
+
}
|
|
82
|
+
function RetryGlyph({ size } = {}) {
|
|
83
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
84
|
+
/* @__PURE__ */ jsx2("path", { d: "M21 12a9 9 0 1 1-3.36-7" }),
|
|
85
|
+
/* @__PURE__ */ jsx2("path", { d: "M21 3v6h-6" })
|
|
86
|
+
] });
|
|
87
|
+
}
|
|
88
|
+
function CaseGlyph({ size = 12 } = {}) {
|
|
89
|
+
return /* @__PURE__ */ jsxs(Svg, { size, children: [
|
|
90
|
+
/* @__PURE__ */ jsx2("path", { d: "m3 15 4-8 4 8" }),
|
|
91
|
+
/* @__PURE__ */ jsx2("path", { d: "M4 13h6" }),
|
|
92
|
+
/* @__PURE__ */ jsx2("rect", { x: "15", y: "9", width: "6", height: "6", rx: "1.5" }),
|
|
93
|
+
/* @__PURE__ */ jsx2("path", { d: "M21 9v6" })
|
|
94
|
+
] });
|
|
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
|
+
}
|
|
111
|
+
|
|
112
|
+
// src/edit/tree/react/icons.tsx
|
|
113
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
114
|
+
var PATHS = {
|
|
115
|
+
folder: /* @__PURE__ */ jsx3("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
|
+
file: /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
117
|
+
/* @__PURE__ */ jsx3("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
118
|
+
/* @__PURE__ */ jsx3("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
|
|
119
|
+
] }),
|
|
120
|
+
"folder-tree": /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
121
|
+
/* @__PURE__ */ jsx3("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" }),
|
|
122
|
+
/* @__PURE__ */ jsx3("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" }),
|
|
123
|
+
/* @__PURE__ */ jsx3("path", { d: "M3 5a2 2 0 0 0 2 2h3" }),
|
|
124
|
+
/* @__PURE__ */ jsx3("path", { d: "M3 3v13a2 2 0 0 0 2 2h3" })
|
|
125
|
+
] }),
|
|
126
|
+
box: /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
127
|
+
/* @__PURE__ */ jsx3("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" }),
|
|
128
|
+
/* @__PURE__ */ jsx3("path", { d: "m3.3 7 8.7 5 8.7-5" }),
|
|
129
|
+
/* @__PURE__ */ jsx3("path", { d: "M12 22V12" })
|
|
130
|
+
] }),
|
|
131
|
+
component: /* @__PURE__ */ jsx3("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
|
+
"file-text": /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
133
|
+
/* @__PURE__ */ jsx3("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
134
|
+
/* @__PURE__ */ jsx3("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
135
|
+
/* @__PURE__ */ jsx3("path", { d: "M8 13h8M8 17h5" })
|
|
136
|
+
] }),
|
|
137
|
+
heading: /* @__PURE__ */ jsx3(Fragment, { children: /* @__PURE__ */ jsx3("path", { d: "M6 4v16M18 4v16M6 12h12" }) }),
|
|
138
|
+
bot: /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
139
|
+
/* @__PURE__ */ jsx3("rect", { x: "3", y: "8", width: "18", height: "12", rx: "2" }),
|
|
140
|
+
/* @__PURE__ */ jsx3("path", { d: "M12 4v4M8 14h.01M16 14h.01" })
|
|
141
|
+
] }),
|
|
142
|
+
link: /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
143
|
+
/* @__PURE__ */ jsx3("path", { d: "M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.8 1.7" }),
|
|
144
|
+
/* @__PURE__ */ jsx3("path", { d: "M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.8-1.7" })
|
|
145
|
+
] }),
|
|
146
|
+
"link-2-off": /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
147
|
+
/* @__PURE__ */ jsx3("path", { d: "M9 17H7A5 5 0 0 1 7 7" }),
|
|
148
|
+
/* @__PURE__ */ jsx3("path", { d: "M15 7h2a5 5 0 0 1 4 8" }),
|
|
149
|
+
/* @__PURE__ */ jsx3("path", { d: "M8 12h4" }),
|
|
150
|
+
/* @__PURE__ */ jsx3("path", { d: "m2 2 20 20" })
|
|
151
|
+
] }),
|
|
152
|
+
"circle-dot": /* @__PURE__ */ jsx3("rect", { x: "9", y: "9", width: "6", height: "6", rx: "1" })
|
|
153
|
+
};
|
|
154
|
+
function TreeIcon({ name, size = 11 }) {
|
|
155
|
+
return /* @__PURE__ */ jsx3(Svg, { size, children: PATHS[name] ?? PATHS["circle-dot"] });
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// src/edit/color/react/icons.tsx
|
|
159
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
160
|
+
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
|
+
function EyedropperIcon({ size = 11 } = {}) {
|
|
162
|
+
return /* @__PURE__ */ jsxs3("svg", { ...svg(size), children: [
|
|
163
|
+
/* @__PURE__ */ jsx4("path", { d: "m2 22 1-1h3l9-9" }),
|
|
164
|
+
/* @__PURE__ */ jsx4("path", { d: "M3 21v-3l9-9" }),
|
|
165
|
+
/* @__PURE__ */ jsx4("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
|
+
] });
|
|
167
|
+
}
|
|
168
|
+
function SwapIcon({ size = 11 } = {}) {
|
|
169
|
+
return /* @__PURE__ */ jsxs3("svg", { ...svg(size), children: [
|
|
170
|
+
/* @__PURE__ */ jsx4("path", { d: "m16 3 4 4-4 4" }),
|
|
171
|
+
/* @__PURE__ */ jsx4("path", { d: "M20 7H4" }),
|
|
172
|
+
/* @__PURE__ */ jsx4("path", { d: "m8 21-4-4 4-4" }),
|
|
173
|
+
/* @__PURE__ */ jsx4("path", { d: "M4 17h16" })
|
|
174
|
+
] });
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// src/edit/history/react/icons.tsx
|
|
178
|
+
import Trash from "@xenosystem/elements/elements/trash";
|
|
179
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
180
|
+
var svgBase = (size) => ({
|
|
181
|
+
width: size,
|
|
182
|
+
height: size,
|
|
183
|
+
viewBox: "0 0 24 24",
|
|
184
|
+
fill: "none",
|
|
185
|
+
stroke: "currentColor",
|
|
186
|
+
strokeWidth: 1.5,
|
|
187
|
+
strokeLinecap: "round",
|
|
188
|
+
strokeLinejoin: "round",
|
|
189
|
+
"aria-hidden": true
|
|
190
|
+
});
|
|
191
|
+
var ENTRY_PATHS = {
|
|
192
|
+
// painting
|
|
193
|
+
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"],
|
|
194
|
+
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"],
|
|
195
|
+
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"],
|
|
196
|
+
// adjustment / effects
|
|
197
|
+
filter: ["M4 6h16", "M7 12h10", "M10 18h4"],
|
|
198
|
+
// geometry
|
|
199
|
+
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"],
|
|
200
|
+
crop: ["M6 2v14a2 2 0 0 0 2 2h14", "M18 22V8a2 2 0 0 0-2-2H2"],
|
|
201
|
+
// layers
|
|
202
|
+
addLayer: ["M3 3h18v18H3z", "M12 8v8", "M8 12h8"],
|
|
203
|
+
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"],
|
|
204
|
+
merge: ["m12 2 4 4-4 4", "M4 6h12", "m12 14 4 4-4 4", "M4 18h12"],
|
|
205
|
+
// clipboard / text / selection
|
|
206
|
+
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"],
|
|
207
|
+
text: ["M4 7V4h16v3", "M9 20h6", "M12 4v16"],
|
|
208
|
+
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"],
|
|
209
|
+
// ai + snapshots
|
|
210
|
+
ai: ["m12 3 1.9 5.8L20 10l-5.2 2.9L13 19l-2.9-5.2L4 12l6.1-1.9z"],
|
|
211
|
+
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"],
|
|
212
|
+
// timeline / audio
|
|
213
|
+
keyframe: ["m12 3 6 9-6 9-6-9z"],
|
|
214
|
+
clip: ["M3 5h18v14H3z", "M8 5v14", "M16 5v14"],
|
|
215
|
+
volume: ["M11 5 6 9H2v6h4l5 4V5Z", "M16 9a4 4 0 0 1 0 6"],
|
|
216
|
+
document: ["M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", "M14 2v5h6"],
|
|
217
|
+
// fallbacks / chrome
|
|
218
|
+
generic: ["M5 5h14v14H5z"],
|
|
219
|
+
original: ["M3 12a9 9 0 1 0 9-9", "M3 4v5h5"],
|
|
220
|
+
rotateCcw: ["M3 12a9 9 0 1 0 3-6.7L3 8", "M3 3v5h5"]
|
|
221
|
+
};
|
|
222
|
+
function EntryIcon({ name, size = 11 }) {
|
|
223
|
+
const paths = ENTRY_PATHS[name] ?? ENTRY_PATHS.generic;
|
|
224
|
+
return /* @__PURE__ */ jsx5("svg", { ...svgBase(size), children: paths.map((d, i) => /* @__PURE__ */ jsx5("path", { d }, i)) });
|
|
225
|
+
}
|
|
226
|
+
function XIcon({ size = 10 }) {
|
|
227
|
+
return /* @__PURE__ */ jsx5(XGlyph, { size });
|
|
228
|
+
}
|
|
229
|
+
var TrashIcon = fromElement(Trash);
|
|
230
|
+
function UndoIcon({ size = 11 }) {
|
|
231
|
+
return /* @__PURE__ */ jsxs4("svg", { ...svgBase(size), children: [
|
|
232
|
+
/* @__PURE__ */ jsx5("path", { d: "M9 14 4 9l5-5" }),
|
|
233
|
+
/* @__PURE__ */ jsx5("path", { d: "M4 9h10.5a5.5 5.5 0 0 1 0 11H11" })
|
|
234
|
+
] });
|
|
235
|
+
}
|
|
236
|
+
function RedoIcon({ size = 11 }) {
|
|
237
|
+
return /* @__PURE__ */ jsxs4("svg", { ...svgBase(size), children: [
|
|
238
|
+
/* @__PURE__ */ jsx5("path", { d: "m15 14 5-5-5-5" }),
|
|
239
|
+
/* @__PURE__ */ jsx5("path", { d: "M20 9H9.5a5.5 5.5 0 0 0 0 11H13" })
|
|
240
|
+
] });
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// src/edit/inspector/react/icons.tsx
|
|
244
|
+
import Link from "@xenosystem/elements/elements/link";
|
|
245
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
246
|
+
var base = (size) => ({
|
|
247
|
+
width: size,
|
|
248
|
+
height: size,
|
|
249
|
+
viewBox: "0 0 24 24",
|
|
250
|
+
fill: "none",
|
|
251
|
+
stroke: "currentColor",
|
|
252
|
+
strokeWidth: 1.5,
|
|
253
|
+
strokeLinecap: "round",
|
|
254
|
+
strokeLinejoin: "round",
|
|
255
|
+
"aria-hidden": true
|
|
256
|
+
});
|
|
257
|
+
function StopwatchIcon({ size = 11 }) {
|
|
258
|
+
return /* @__PURE__ */ jsxs5("svg", { ...base(size), children: [
|
|
259
|
+
/* @__PURE__ */ jsx6("path", { d: "M10 2h4" }),
|
|
260
|
+
/* @__PURE__ */ jsx6("path", { d: "M12 14v-4" }),
|
|
261
|
+
/* @__PURE__ */ jsx6("path", { d: "M20 14a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z" })
|
|
262
|
+
] });
|
|
263
|
+
}
|
|
264
|
+
function DiamondIcon({ size = 9, filled = false }) {
|
|
265
|
+
return /* @__PURE__ */ jsx6("svg", { ...base(size), fill: filled ? "currentColor" : "none", children: /* @__PURE__ */ jsx6("path", { d: "m12 3 7 9-7 9-7-9z" }) });
|
|
266
|
+
}
|
|
267
|
+
function PrevIcon({ size = 9 }) {
|
|
268
|
+
return /* @__PURE__ */ jsx6("svg", { ...base(size), children: /* @__PURE__ */ jsx6("path", { d: "m15 18-6-6 6-6" }) });
|
|
269
|
+
}
|
|
270
|
+
function NextIcon({ size = 9 }) {
|
|
271
|
+
return /* @__PURE__ */ jsx6("svg", { ...base(size), children: /* @__PURE__ */ jsx6("path", { d: "m9 18 6-6-6-6" }) });
|
|
272
|
+
}
|
|
273
|
+
var LinkIcon = fromElement(Link, 10);
|
|
274
|
+
function ResetIcon({ size = 10 }) {
|
|
275
|
+
return /* @__PURE__ */ jsxs5("svg", { ...base(size), children: [
|
|
276
|
+
/* @__PURE__ */ jsx6("path", { d: "M3 12a9 9 0 1 0 3-6.7L3 8" }),
|
|
277
|
+
/* @__PURE__ */ jsx6("path", { d: "M3 3v5h5" })
|
|
278
|
+
] });
|
|
279
|
+
}
|
|
280
|
+
function XIcon2({ size = 10 }) {
|
|
281
|
+
return /* @__PURE__ */ jsxs5("svg", { ...base(size), children: [
|
|
282
|
+
/* @__PURE__ */ jsx6("path", { d: "M18 6 6 18" }),
|
|
283
|
+
/* @__PURE__ */ jsx6("path", { d: "m6 6 12 12" })
|
|
284
|
+
] });
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// src/edit/layers/react/icons.tsx
|
|
288
|
+
import Eye from "@xenosystem/elements/elements/eye";
|
|
289
|
+
import EyeOff from "@xenosystem/elements/elements/eye-off";
|
|
290
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
291
|
+
var base2 = (size) => ({
|
|
292
|
+
width: size,
|
|
293
|
+
height: size,
|
|
294
|
+
viewBox: "0 0 24 24",
|
|
295
|
+
fill: "none",
|
|
296
|
+
stroke: "currentColor",
|
|
297
|
+
strokeWidth: 1.5,
|
|
298
|
+
strokeLinecap: "round",
|
|
299
|
+
strokeLinejoin: "round",
|
|
300
|
+
"aria-hidden": true
|
|
301
|
+
});
|
|
302
|
+
var EyeIcon = fromElement(Eye, 12);
|
|
303
|
+
var EyeOffIcon = fromElement(EyeOff, 12);
|
|
304
|
+
function LockIcon({ size = 12, className }) {
|
|
305
|
+
return /* @__PURE__ */ jsxs6("svg", { ...base2(size), className, children: [
|
|
306
|
+
/* @__PURE__ */ jsx7("rect", { width: "14", height: "10", x: "5", y: "11", rx: "2" }),
|
|
307
|
+
/* @__PURE__ */ jsx7("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" })
|
|
308
|
+
] });
|
|
309
|
+
}
|
|
310
|
+
function UnlockIcon({ size = 12, className }) {
|
|
311
|
+
return /* @__PURE__ */ jsxs6("svg", { ...base2(size), className, children: [
|
|
312
|
+
/* @__PURE__ */ jsx7("rect", { width: "14", height: "10", x: "5", y: "11", rx: "2" }),
|
|
313
|
+
/* @__PURE__ */ jsx7("path", { d: "M8 11V7a4 4 0 0 1 7.5-2" })
|
|
314
|
+
] });
|
|
315
|
+
}
|
|
316
|
+
function KindGlyph({ size = 10 }) {
|
|
317
|
+
return /* @__PURE__ */ jsx7("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__ */ jsx7("rect", { x: "4", y: "4", width: "16", height: "16", rx: "2" }) });
|
|
318
|
+
}
|
|
319
|
+
function VisibilityIcon({ open, size }) {
|
|
320
|
+
return open ? /* @__PURE__ */ jsx7(EyeIcon, { size }) : /* @__PURE__ */ jsx7(EyeOffIcon, { size });
|
|
321
|
+
}
|
|
322
|
+
function LockStateIcon({ locked, size }) {
|
|
323
|
+
return locked ? /* @__PURE__ */ jsx7(LockIcon, { size }) : /* @__PURE__ */ jsx7(UnlockIcon, { size });
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// src/time/transport/react/icons.tsx
|
|
327
|
+
import Pause from "@xenosystem/elements/elements/pause";
|
|
328
|
+
import Play from "@xenosystem/elements/elements/play";
|
|
329
|
+
import Stop from "@xenosystem/elements/elements/stop";
|
|
330
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
331
|
+
var base3 = (size) => ({
|
|
332
|
+
width: size,
|
|
333
|
+
height: size,
|
|
334
|
+
viewBox: "0 0 24 24",
|
|
335
|
+
fill: "none",
|
|
336
|
+
stroke: "currentColor",
|
|
337
|
+
strokeWidth: 1.5,
|
|
338
|
+
strokeLinecap: "round",
|
|
339
|
+
strokeLinejoin: "round",
|
|
340
|
+
"aria-hidden": true
|
|
341
|
+
});
|
|
342
|
+
var PlayIcon = fromElement(Play, 12);
|
|
343
|
+
var PauseIcon = fromElement(Pause, 12);
|
|
344
|
+
var StopIcon = fromElement(Stop);
|
|
345
|
+
function RecordIcon({ size = 11 }) {
|
|
346
|
+
return /* @__PURE__ */ jsx8("svg", { ...base3(size), fill: "currentColor", stroke: "none", children: /* @__PURE__ */ jsx8("rect", { x: "6", y: "6", width: "12", height: "12", rx: "3" }) });
|
|
347
|
+
}
|
|
348
|
+
function StartIcon({ size = 11 }) {
|
|
349
|
+
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
350
|
+
/* @__PURE__ */ jsx8("path", { d: "M19 20 9 12l10-8z" }),
|
|
351
|
+
/* @__PURE__ */ jsx8("path", { d: "M5 19V5" })
|
|
352
|
+
] });
|
|
353
|
+
}
|
|
354
|
+
function EndIcon({ size = 11 }) {
|
|
355
|
+
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
356
|
+
/* @__PURE__ */ jsx8("path", { d: "m5 4 10 8-10 8z" }),
|
|
357
|
+
/* @__PURE__ */ jsx8("path", { d: "M19 5v14" })
|
|
358
|
+
] });
|
|
359
|
+
}
|
|
360
|
+
function StepBackIcon({ size = 11 }) {
|
|
361
|
+
return /* @__PURE__ */ jsx8("svg", { ...base3(size), children: /* @__PURE__ */ jsx8("path", { d: "M15 18 9 12l6-6" }) });
|
|
362
|
+
}
|
|
363
|
+
function StepForwardIcon({ size = 11 }) {
|
|
364
|
+
return /* @__PURE__ */ jsx8("svg", { ...base3(size), children: /* @__PURE__ */ jsx8("path", { d: "m9 6 6 6-6 6" }) });
|
|
365
|
+
}
|
|
366
|
+
function ShuttleLeftIcon({ size = 11 }) {
|
|
367
|
+
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
368
|
+
/* @__PURE__ */ jsx8("path", { d: "M11 19 2 12l9-7z" }),
|
|
369
|
+
/* @__PURE__ */ jsx8("path", { d: "M22 19l-9-7 9-7z" })
|
|
370
|
+
] });
|
|
371
|
+
}
|
|
372
|
+
function ShuttleRightIcon({ size = 11 }) {
|
|
373
|
+
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
374
|
+
/* @__PURE__ */ jsx8("path", { d: "m13 19 9-7-9-7z" }),
|
|
375
|
+
/* @__PURE__ */ jsx8("path", { d: "m2 19 9-7-9-7z" })
|
|
376
|
+
] });
|
|
377
|
+
}
|
|
378
|
+
function LoopIcon({ size = 11 }) {
|
|
379
|
+
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
380
|
+
/* @__PURE__ */ jsx8("path", { d: "m17 2 4 4-4 4" }),
|
|
381
|
+
/* @__PURE__ */ jsx8("path", { d: "M3 11v-1a4 4 0 0 1 4-4h14" }),
|
|
382
|
+
/* @__PURE__ */ jsx8("path", { d: "m7 22-4-4 4-4" }),
|
|
383
|
+
/* @__PURE__ */ jsx8("path", { d: "M21 13v1a4 4 0 0 1-4 4H3" })
|
|
384
|
+
] });
|
|
385
|
+
}
|
|
386
|
+
function MetronomeIcon({ size = 11 }) {
|
|
387
|
+
return /* @__PURE__ */ jsxs7("svg", { ...base3(size), children: [
|
|
388
|
+
/* @__PURE__ */ jsx8("path", { d: "M9 3h6l4 18H5z" }),
|
|
389
|
+
/* @__PURE__ */ jsx8("path", { d: "m12 18 4-11" })
|
|
390
|
+
] });
|
|
391
|
+
}
|
|
392
|
+
function PlayPauseIcon({ playing, size }) {
|
|
393
|
+
return playing ? /* @__PURE__ */ jsx8(PauseIcon, { size }) : /* @__PURE__ */ jsx8(PlayIcon, { size });
|
|
394
|
+
}
|
|
395
|
+
var TRANSPORT_ICONS = {
|
|
396
|
+
"transport/PlayIcon": PlayIcon,
|
|
397
|
+
"transport/PauseIcon": PauseIcon,
|
|
398
|
+
"transport/PlayPauseIcon": PlayPauseIcon,
|
|
399
|
+
"transport/StopIcon": StopIcon,
|
|
400
|
+
"transport/RecordIcon": RecordIcon,
|
|
401
|
+
"transport/StartIcon": StartIcon,
|
|
402
|
+
"transport/EndIcon": EndIcon,
|
|
403
|
+
"transport/StepBackIcon": StepBackIcon,
|
|
404
|
+
"transport/StepForwardIcon": StepForwardIcon,
|
|
405
|
+
"transport/ShuttleLeftIcon": ShuttleLeftIcon,
|
|
406
|
+
"transport/ShuttleRightIcon": ShuttleRightIcon,
|
|
407
|
+
"transport/LoopIcon": LoopIcon,
|
|
408
|
+
"transport/MetronomeIcon": MetronomeIcon
|
|
409
|
+
};
|
|
410
|
+
var TRANSPORT_RUNTIME_UNITS = [];
|
|
411
|
+
|
|
412
|
+
// src/icons/index.ts
|
|
413
|
+
var ICONS = Object.freeze({
|
|
414
|
+
// transport
|
|
415
|
+
"icons/Play": PlayIcon,
|
|
416
|
+
"icons/Pause": PauseIcon,
|
|
417
|
+
"icons/PlayPause": PlayPauseIcon,
|
|
418
|
+
"icons/Stop": StopIcon,
|
|
419
|
+
"icons/Record": RecordIcon,
|
|
420
|
+
"icons/Start": StartIcon,
|
|
421
|
+
"icons/End": EndIcon,
|
|
422
|
+
"icons/StepBack": StepBackIcon,
|
|
423
|
+
"icons/StepForward": StepForwardIcon,
|
|
424
|
+
"icons/ShuttleLeft": ShuttleLeftIcon,
|
|
425
|
+
"icons/ShuttleRight": ShuttleRightIcon,
|
|
426
|
+
"icons/Loop": LoopIcon,
|
|
427
|
+
"icons/Metronome": MetronomeIcon,
|
|
428
|
+
// history
|
|
429
|
+
"icons/Undo": UndoIcon,
|
|
430
|
+
"icons/Redo": RedoIcon,
|
|
431
|
+
"icons/Trash": TrashIcon,
|
|
432
|
+
"icons/HistoryEntry": EntryIcon,
|
|
433
|
+
// inspector
|
|
434
|
+
"icons/Stopwatch": StopwatchIcon,
|
|
435
|
+
"icons/Diamond": DiamondIcon,
|
|
436
|
+
"icons/Prev": PrevIcon,
|
|
437
|
+
"icons/Next": NextIcon,
|
|
438
|
+
"icons/Link": LinkIcon,
|
|
439
|
+
"icons/Reset": ResetIcon,
|
|
440
|
+
// layers
|
|
441
|
+
"icons/Kind": KindGlyph,
|
|
442
|
+
"icons/Visibility": VisibilityIcon,
|
|
443
|
+
"icons/LockState": LockStateIcon,
|
|
444
|
+
// color
|
|
445
|
+
"icons/Swap": SwapIcon,
|
|
446
|
+
"icons/Eyedropper": EyedropperIcon,
|
|
447
|
+
// shared (src/icons/glyphs.tsx — the one source; the data/ops/time blocks re-export these)
|
|
448
|
+
"icons/Refresh": RefreshGlyph,
|
|
449
|
+
"icons/Close": XGlyph,
|
|
450
|
+
"icons/Plus": PlusGlyph,
|
|
451
|
+
"icons/Chevron": ChevronGlyph,
|
|
452
|
+
"icons/Download": DownloadGlyph,
|
|
453
|
+
"icons/Plug": PlugGlyph,
|
|
454
|
+
"icons/SortAsc": SortAscGlyph,
|
|
455
|
+
"icons/SortDesc": SortDescGlyph,
|
|
456
|
+
"icons/Expand": ExpandGlyph,
|
|
457
|
+
"icons/Collapse": CollapseGlyph,
|
|
458
|
+
"icons/Copy": CopyGlyph,
|
|
459
|
+
"icons/Clear": ClearGlyph,
|
|
460
|
+
"icons/Cancel": CancelGlyph,
|
|
461
|
+
"icons/Retry": RetryGlyph,
|
|
462
|
+
"icons/Case": CaseGlyph,
|
|
463
|
+
"icons/WholeWord": WholeWordGlyph,
|
|
464
|
+
"icons/Regex": RegexGlyph,
|
|
465
|
+
"icons/TreeKind": TreeIcon
|
|
466
|
+
});
|
|
467
|
+
var ICON_UNITS = Object.keys(ICONS);
|
|
468
|
+
|
|
469
|
+
export {
|
|
470
|
+
Svg,
|
|
471
|
+
RefreshGlyph,
|
|
472
|
+
ChevronGlyph,
|
|
473
|
+
PlugGlyph,
|
|
474
|
+
SortAscGlyph,
|
|
475
|
+
SortDescGlyph,
|
|
476
|
+
ExpandGlyph,
|
|
477
|
+
CollapseGlyph,
|
|
478
|
+
TreeIcon,
|
|
479
|
+
EyedropperIcon,
|
|
480
|
+
SwapIcon,
|
|
481
|
+
EntryIcon,
|
|
482
|
+
XIcon,
|
|
483
|
+
TrashIcon,
|
|
484
|
+
UndoIcon,
|
|
485
|
+
RedoIcon,
|
|
486
|
+
StopwatchIcon,
|
|
487
|
+
DiamondIcon,
|
|
488
|
+
PrevIcon,
|
|
489
|
+
NextIcon,
|
|
490
|
+
LinkIcon,
|
|
491
|
+
ResetIcon,
|
|
492
|
+
XIcon2,
|
|
493
|
+
KindGlyph,
|
|
494
|
+
VisibilityIcon,
|
|
495
|
+
LockStateIcon,
|
|
496
|
+
StopIcon,
|
|
497
|
+
RecordIcon,
|
|
498
|
+
StartIcon,
|
|
499
|
+
EndIcon,
|
|
500
|
+
StepBackIcon,
|
|
501
|
+
StepForwardIcon,
|
|
502
|
+
ShuttleLeftIcon,
|
|
503
|
+
ShuttleRightIcon,
|
|
504
|
+
LoopIcon,
|
|
505
|
+
MetronomeIcon,
|
|
506
|
+
PlayPauseIcon,
|
|
507
|
+
TRANSPORT_ICONS,
|
|
508
|
+
TRANSPORT_RUNTIME_UNITS,
|
|
509
|
+
ICONS,
|
|
510
|
+
ICON_UNITS
|
|
511
|
+
};
|
package/dist/data/index.js
CHANGED
|
@@ -6,16 +6,14 @@ import {
|
|
|
6
6
|
quoteLiteral,
|
|
7
7
|
renderFilterGroup
|
|
8
8
|
} from "../chunk-DJJGZ6U4.js";
|
|
9
|
-
import {
|
|
10
|
-
ICONS
|
|
11
|
-
} from "../chunk-W4PTX2Y4.js";
|
|
12
9
|
import {
|
|
13
10
|
ChevronGlyph,
|
|
11
|
+
ICONS,
|
|
14
12
|
PlugGlyph,
|
|
15
13
|
RefreshGlyph,
|
|
16
14
|
SortAscGlyph,
|
|
17
15
|
SortDescGlyph
|
|
18
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-6XVFYPVH.js";
|
|
19
17
|
import "../chunk-2KG3PWR4.js";
|
|
20
18
|
|
|
21
19
|
// src/data/table/panel.ts
|
package/dist/edit/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ChevronGlyph,
|
|
3
|
+
CollapseGlyph,
|
|
2
4
|
DiamondIcon,
|
|
3
5
|
EntryIcon,
|
|
6
|
+
ExpandGlyph,
|
|
4
7
|
EyedropperIcon,
|
|
5
8
|
ICONS,
|
|
6
9
|
KindGlyph,
|
|
@@ -9,6 +12,7 @@ import {
|
|
|
9
12
|
NextIcon,
|
|
10
13
|
PrevIcon,
|
|
11
14
|
RedoIcon,
|
|
15
|
+
RefreshGlyph,
|
|
12
16
|
ResetIcon,
|
|
13
17
|
StopwatchIcon,
|
|
14
18
|
SwapIcon,
|
|
@@ -18,13 +22,7 @@ import {
|
|
|
18
22
|
VisibilityIcon,
|
|
19
23
|
XIcon,
|
|
20
24
|
XIcon2
|
|
21
|
-
} from "../chunk-
|
|
22
|
-
import {
|
|
23
|
-
ChevronGlyph,
|
|
24
|
-
CollapseGlyph,
|
|
25
|
-
ExpandGlyph,
|
|
26
|
-
RefreshGlyph
|
|
27
|
-
} from "../chunk-K7YLLV2W.js";
|
|
25
|
+
} from "../chunk-6XVFYPVH.js";
|
|
28
26
|
import "../chunk-2KG3PWR4.js";
|
|
29
27
|
|
|
30
28
|
// src/edit/layers/panel.ts
|