@xenosystem/blocks 0.13.0 → 0.13.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-GQWAIPDF.js +125 -0
- package/dist/{chunk-OCEZTO2D.js → chunk-J5XEAON6.js} +52 -1
- package/dist/data/index.js +169 -295
- package/dist/edit/index.js +47 -142
- package/dist/icons/index.d.ts +20 -2
- package/dist/icons/index.js +40 -3
- package/dist/ops/index.js +140 -199
- package/dist/time/index.js +25 -44
- package/package.json +1 -1
package/dist/time/index.js
CHANGED
|
@@ -13,6 +13,9 @@ import {
|
|
|
13
13
|
TRANSPORT_ICONS,
|
|
14
14
|
TRANSPORT_RUNTIME_UNITS
|
|
15
15
|
} from "../chunk-BP4EYOCQ.js";
|
|
16
|
+
import {
|
|
17
|
+
ChevronGlyph
|
|
18
|
+
} from "../chunk-GQWAIPDF.js";
|
|
16
19
|
import {
|
|
17
20
|
__reExport
|
|
18
21
|
} from "../chunk-2KG3PWR4.js";
|
|
@@ -4115,29 +4118,7 @@ import {
|
|
|
4115
4118
|
Toolbar as Toolbar2,
|
|
4116
4119
|
ToolbarGroup as ToolbarGroup2
|
|
4117
4120
|
} from "@xenosystem/components/chrome";
|
|
4118
|
-
|
|
4119
|
-
// src/time/calendar/react/icons.tsx
|
|
4120
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
4121
|
-
function ChevronGlyph({ direction }) {
|
|
4122
|
-
return /* @__PURE__ */ jsx3(
|
|
4123
|
-
"svg",
|
|
4124
|
-
{
|
|
4125
|
-
width: 11,
|
|
4126
|
-
height: 11,
|
|
4127
|
-
viewBox: "0 0 24 24",
|
|
4128
|
-
fill: "none",
|
|
4129
|
-
stroke: "currentColor",
|
|
4130
|
-
strokeWidth: "1.5",
|
|
4131
|
-
strokeLinecap: "round",
|
|
4132
|
-
strokeLinejoin: "round",
|
|
4133
|
-
"aria-hidden": "true",
|
|
4134
|
-
children: direction === "left" ? /* @__PURE__ */ jsx3("path", { d: "m15 18-6-6 6-6" }) : /* @__PURE__ */ jsx3("path", { d: "m9 18 6-6-6-6" })
|
|
4135
|
-
}
|
|
4136
|
-
);
|
|
4137
|
-
}
|
|
4138
|
-
|
|
4139
|
-
// src/time/calendar/react/CalendarPanelView.tsx
|
|
4140
|
-
import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
4121
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
4141
4122
|
var WEEKDAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
4142
4123
|
function CalendarPanelView({
|
|
4143
4124
|
controller,
|
|
@@ -4145,33 +4126,33 @@ function CalendarPanelView({
|
|
|
4145
4126
|
emptyHint
|
|
4146
4127
|
}) {
|
|
4147
4128
|
const state = useSyncExternalStore3(controller.subscribe, controller.getState, controller.getState);
|
|
4148
|
-
const toolbar = /* @__PURE__ */
|
|
4129
|
+
const toolbar = /* @__PURE__ */ jsx3(
|
|
4149
4130
|
Toolbar2,
|
|
4150
4131
|
{
|
|
4151
4132
|
left: /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
4152
|
-
/* @__PURE__ */
|
|
4133
|
+
/* @__PURE__ */ jsx3(
|
|
4153
4134
|
IconButton2,
|
|
4154
4135
|
{
|
|
4155
|
-
icon: /* @__PURE__ */
|
|
4136
|
+
icon: /* @__PURE__ */ jsx3(ChevronGlyph, { direction: "left" }),
|
|
4156
4137
|
label: "Previous",
|
|
4157
4138
|
onClick: () => controller.navigate(-1)
|
|
4158
4139
|
}
|
|
4159
4140
|
),
|
|
4160
|
-
/* @__PURE__ */
|
|
4141
|
+
/* @__PURE__ */ jsx3(
|
|
4161
4142
|
IconButton2,
|
|
4162
4143
|
{
|
|
4163
|
-
icon: /* @__PURE__ */
|
|
4144
|
+
icon: /* @__PURE__ */ jsx3(ChevronGlyph, { direction: "right" }),
|
|
4164
4145
|
label: "Next",
|
|
4165
4146
|
onClick: () => controller.navigate(1)
|
|
4166
4147
|
}
|
|
4167
4148
|
),
|
|
4168
|
-
/* @__PURE__ */
|
|
4169
|
-
/* @__PURE__ */
|
|
4149
|
+
/* @__PURE__ */ jsx3(TextButton2, { onClick: () => controller.goToToday(), children: "Today" }),
|
|
4150
|
+
/* @__PURE__ */ jsx3("span", { style: { fontSize: 11, opacity: 0.8 }, children: controller.anchorKey().slice(0, 7) })
|
|
4170
4151
|
] }),
|
|
4171
4152
|
right: /* @__PURE__ */ jsxs3(ToolbarGroup2, { end: true, children: [
|
|
4172
|
-
state.partial ? /* @__PURE__ */
|
|
4173
|
-
/* @__PURE__ */
|
|
4174
|
-
/* @__PURE__ */
|
|
4153
|
+
state.partial ? /* @__PURE__ */ jsx3(Badge, { tone: "warning", title: "Some measures have not finished syncing.", children: "partial" }) : null,
|
|
4154
|
+
/* @__PURE__ */ jsx3(Badge, { title: "Every date is bucketed in this zone.", children: controller.timeZone() }),
|
|
4155
|
+
/* @__PURE__ */ jsx3(
|
|
4175
4156
|
SegmentedControl,
|
|
4176
4157
|
{
|
|
4177
4158
|
size: "sm",
|
|
@@ -4192,13 +4173,13 @@ function CalendarPanelView({
|
|
|
4192
4173
|
);
|
|
4193
4174
|
const body = (() => {
|
|
4194
4175
|
if (state.configProblem) {
|
|
4195
|
-
return /* @__PURE__ */
|
|
4176
|
+
return /* @__PURE__ */ jsx3(EmptyState2, { title: "Not configured", hint: state.configProblem });
|
|
4196
4177
|
}
|
|
4197
4178
|
if (state.errorMessage) {
|
|
4198
|
-
return /* @__PURE__ */
|
|
4179
|
+
return /* @__PURE__ */ jsx3(ErrorState, { title: "Could not load events", message: state.errorMessage });
|
|
4199
4180
|
}
|
|
4200
4181
|
if (state.empty) {
|
|
4201
|
-
return /* @__PURE__ */
|
|
4182
|
+
return /* @__PURE__ */ jsx3(
|
|
4202
4183
|
EmptyState2,
|
|
4203
4184
|
{
|
|
4204
4185
|
title: "Nothing scheduled",
|
|
@@ -4207,7 +4188,7 @@ function CalendarPanelView({
|
|
|
4207
4188
|
);
|
|
4208
4189
|
}
|
|
4209
4190
|
if (state.viewMode === "agenda" || state.viewMode === "timeline") {
|
|
4210
|
-
return /* @__PURE__ */
|
|
4191
|
+
return /* @__PURE__ */ jsx3(ScrollArea, { children: /* @__PURE__ */ jsx3(RowList, { role: "listbox", "aria-label": "Events", children: state.events.map((event) => /* @__PURE__ */ jsx3(
|
|
4211
4192
|
Row,
|
|
4212
4193
|
{
|
|
4213
4194
|
label: event.title,
|
|
@@ -4215,14 +4196,14 @@ function CalendarPanelView({
|
|
|
4215
4196
|
selected: state.selection.includes(event.id),
|
|
4216
4197
|
onClick: () => controller.select([event.id]),
|
|
4217
4198
|
onDoubleClick: () => controller.activateRow(event.id),
|
|
4218
|
-
trailing: event.status !== void 0 ? /* @__PURE__ */
|
|
4199
|
+
trailing: event.status !== void 0 ? /* @__PURE__ */ jsx3(Badge, { tone: statusTone(event.status), children: String(event.status) }) : null
|
|
4219
4200
|
},
|
|
4220
4201
|
event.id
|
|
4221
4202
|
)) }) });
|
|
4222
4203
|
}
|
|
4223
4204
|
const columns = state.viewMode === "day" ? 1 : 7;
|
|
4224
4205
|
return /* @__PURE__ */ jsxs3(ScrollArea, { children: [
|
|
4225
|
-
columns === 7 ? /* @__PURE__ */
|
|
4206
|
+
columns === 7 ? /* @__PURE__ */ jsx3("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)" }, children: WEEKDAYS.map((_, i) => /* @__PURE__ */ jsx3(
|
|
4226
4207
|
"div",
|
|
4227
4208
|
{
|
|
4228
4209
|
style: {
|
|
@@ -4236,7 +4217,7 @@ function CalendarPanelView({
|
|
|
4236
4217
|
},
|
|
4237
4218
|
i
|
|
4238
4219
|
)) }) : null,
|
|
4239
|
-
/* @__PURE__ */
|
|
4220
|
+
/* @__PURE__ */ jsx3("div", { style: { display: "grid", gridTemplateColumns: `repeat(${columns}, 1fr)`, gap: 1 }, children: state.cells.map((cell) => /* @__PURE__ */ jsxs3(
|
|
4240
4221
|
"div",
|
|
4241
4222
|
{
|
|
4242
4223
|
onClick: () => controller.activateSlot(cell.key),
|
|
@@ -4249,8 +4230,8 @@ function CalendarPanelView({
|
|
|
4249
4230
|
boxShadow: cell.today ? "inset 0 0 0 1px var(--xeno-control)" : void 0
|
|
4250
4231
|
},
|
|
4251
4232
|
children: [
|
|
4252
|
-
/* @__PURE__ */
|
|
4253
|
-
cell.events.map((event) => /* @__PURE__ */
|
|
4233
|
+
/* @__PURE__ */ jsx3("div", { style: { fontSize: 9, opacity: 0.7, fontVariantNumeric: "tabular-nums" }, children: cell.day }),
|
|
4234
|
+
cell.events.map((event) => /* @__PURE__ */ jsx3(Chip, { event, controller, state }, event.id)),
|
|
4254
4235
|
cell.overflow > 0 ? /* @__PURE__ */ jsxs3("div", { style: { fontSize: 9, opacity: 0.5 }, children: [
|
|
4255
4236
|
"+",
|
|
4256
4237
|
cell.overflow,
|
|
@@ -4265,7 +4246,7 @@ function CalendarPanelView({
|
|
|
4265
4246
|
return /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 }, children: [
|
|
4266
4247
|
toolbar,
|
|
4267
4248
|
body,
|
|
4268
|
-
/* @__PURE__ */
|
|
4249
|
+
/* @__PURE__ */ jsx3(
|
|
4269
4250
|
StatusBar2,
|
|
4270
4251
|
{
|
|
4271
4252
|
left: `${state.events.length} event${state.events.length === 1 ? "" : "s"}`,
|
|
@@ -4309,7 +4290,7 @@ function Chip({
|
|
|
4309
4290
|
cursor: "pointer"
|
|
4310
4291
|
},
|
|
4311
4292
|
children: [
|
|
4312
|
-
event.allDay ? null : /* @__PURE__ */
|
|
4293
|
+
event.allDay ? null : /* @__PURE__ */ jsx3("span", { style: { opacity: 0.6, marginRight: 3, fontVariantNumeric: "tabular-nums" }, children: formatMinutes(event.startMinutes) }),
|
|
4313
4294
|
event.title
|
|
4314
4295
|
]
|
|
4315
4296
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenosystem/blocks",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.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",
|